Changes between Initial Version and Version 1 of Ticket #19648, comment 17


Ignore:
Timestamp:
2022-05-25T18:55:44+02:00 (4 years ago)
Author:
taylor.smock

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #19648, comment 17

    initial v1  
    22
    33This can probably be fixed by moving the `FileWatcher#registerSource` call above the `MapCSSTagChecker#addMapCss` call.
     4
     5{{{#!diff
     6diff --git a/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java b/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
     7index ef9c500e49..40e9b5f991 100644
     8--- a/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
     9+++ b/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
     10@@ -331,10 +331,10 @@ public class MapCSSTagChecker extends Test.TagTest {
     11                 } else if (Logging.isDebugEnabled()) {
     12                     Logging.debug(tr("Adding {0} to tag checker", i));
     13                 }
     14-                addMapCSS(i);
     15                 if (Config.getPref().getBoolean("validator.auto_reload_local_rules", true) && source.isLocal()) {
     16                     FileWatcher.getDefaultInstance().registerSource(source);
     17                 }
     18+                addMapCSS(i);
     19             } catch (IOException | IllegalStateException | IllegalArgumentException ex) {
     20                 Logging.warn(tr("Failed to add {0} to tag checker", i));
     21                 Logging.log(Logging.LEVEL_WARN, ex);
     22diff --git a/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java b/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
     23index ef9c500e49..40e9b5f991 100644
     24--- a/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
     25+++ b/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
     26@@ -331,10 +331,10 @@ public class MapCSSTagChecker extends Test.TagTest {
     27                 } else if (Logging.isDebugEnabled()) {
     28                     Logging.debug(tr("Adding {0} to tag checker", i));
     29                 }
     30-                addMapCSS(i);
     31                 if (Config.getPref().getBoolean("validator.auto_reload_local_rules", true) && source.isLocal()) {
     32                     FileWatcher.getDefaultInstance().registerSource(source);
     33                 }
     34+                addMapCSS(i);
     35             } catch (IOException | IllegalStateException | IllegalArgumentException ex) {
     36                 Logging.warn(tr("Failed to add {0} to tag checker", i));
     37                 Logging.log(Logging.LEVEL_WARN, ex);
     38}}}