Changeset 11850 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2017-04-07T01:45:28+02:00 (7 years ago)
Author:
Don-vip
Message:

sonar - squid:S2386 - Mutable fields should not be "public static"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java

    r11553 r11850  
    178178    /**
    179179     * Plugins can add their Marker creation stuff at the bottom or top of this list
    180      * (depending on whether they want to override default behaviour or just add new
    181      * stuff).
    182      */
    183     public static final List<MarkerProducers> markerProducers = new LinkedList<>();
     180     * (depending on whether they want to override default behaviour or just add new stuff).
     181     */
     182    private static final List<MarkerProducers> markerProducers = new LinkedList<>();
    184183
    185184    // Add one Marker specifying the default behaviour.
     
    222221    }
    223222
     223    /**
     224     * Add a new marker producers at the end of the JOSM list.
     225     * @param mp a new marker producers
     226     * @since 11850
     227     */
     228    public static void appendMarkerProducer(MarkerProducers mp) {
     229        markerProducers.add(mp);
     230    }
     231
     232    /**
     233     * Add a new marker producers at the beginning of the JOSM list.
     234     * @param mp a new marker producers
     235     * @since 11850
     236     */
     237    public static void prependMarkerProducer(MarkerProducers mp) {
     238        markerProducers.add(0, mp);
     239    }
     240
    224241    private static URL uriToUrl(String uri, File relativePath) {
    225242        URL url = null;
Note: See TracChangeset for help on using the changeset viewer.