Changeset 17756 in josm for trunk/src/org


Ignore:
Timestamp:
2021-04-12T07:57:01+02:00 (4 years ago)
Author:
simon04
Message:

see #20745 - Avoid heap allocations due to ValidatorPrefHelper.PREF_OTHER (fix NPE)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java

    r17751 r17756  
    2626import org.openstreetmap.josm.data.osm.IPrimitive;
    2727import org.openstreetmap.josm.data.osm.OsmPrimitive;
     28import org.openstreetmap.josm.data.preferences.BooleanProperty;
    2829import org.openstreetmap.josm.data.preferences.CachingProperty;
    2930import org.openstreetmap.josm.data.preferences.sources.SourceEntry;
     
    6061    private final Map<MapCSSRule, MapCSSTagCheckerAndRule> ruleToCheckMap = new HashMap<>();
    6162    private static final Map<IPrimitive, Area> mpAreaCache = new HashMap<>();
    62     private static final CachingProperty<Boolean> PREF_OTHER = ValidatorPrefHelper.PREF_OTHER.cached();
    6363    static final boolean ALL_TESTS = true;
    6464    static final boolean ONLY_SELECTED_TESTS = false;
     65
     66    /**
     67     * Cached version of {@link ValidatorPrefHelper#PREF_OTHER}, see #20745.
     68     */
     69    private static final CachingProperty<Boolean> PREF_OTHER = new BooleanProperty("validator.other", false).cached();
    6570
    6671    /**
Note: See TracChangeset for help on using the changeset viewer.