Changeset 8882 in josm


Ignore:
Timestamp:
2015-10-15T01:02:36+02:00 (9 years ago)
Author:
Don-vip
Message:

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

Location:
trunk/src/org/openstreetmap/josm
Files:
10 edited

Legend:

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

    r8870 r8882  
    8181    public static double griddetail;
    8282
    83     public static final Collection<String> ignoredErrors = new TreeSet<>();
     83    private static final Collection<String> ignoredErrors = new TreeSet<>();
    8484
    8585    /**
  • trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java

    r8512 r8882  
    3737
    3838    /** Values for {@code power} key interpreted as power lines */
    39     public static final Collection<String> POWER_LINE_TAGS = Arrays.asList("line", "minor_line");
     39    protected static final Collection<String> POWER_LINE_TAGS = Arrays.asList("line", "minor_line");
    4040    /** Values for {@code power} key interpreted as power towers */
    41     public static final Collection<String> POWER_TOWER_TAGS = Arrays.asList("tower", "pole");
     41    protected static final Collection<String> POWER_TOWER_TAGS = Arrays.asList("tower", "pole");
    4242    /** Values for {@code power} key interpreted as power stations */
    43     public static final Collection<String> POWER_STATION_TAGS = Arrays.asList("station", "sub_station", "substation", "plant", "generator");
     43    protected static final Collection<String> POWER_STATION_TAGS = Arrays.asList("station", "sub_station", "substation", "plant", "generator");
    4444    /** Values for {@code power} key interpreted as allowed power items */
    45     public static final Collection<String> POWER_ALLOWED_TAGS = Arrays.asList("switch", "transformer", "busbar", "generator", "switchgear");
     45    protected static final Collection<String> POWER_ALLOWED_TAGS = Arrays.asList("switch", "transformer", "busbar", "generator", "switchgear");
    4646
    4747    private final Map<Way, String> towerPoleTagMap = new HashMap<>();
  • trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java

    r8743 r8882  
    4242
    4343    /** Ways that must have a name */
    44     public static final Set<String> NAMED_WAYS = new HashSet<>();
     44    protected static final Set<String> NAMED_WAYS = new HashSet<>();
    4545    static {
    4646        NAMED_WAYS.add("motorway");
     
    5454
    5555    /** Whitelist of roles allowed to reference an untagged way */
    56     public static final Set<String> WHITELIST = new HashSet<>();
     56    protected static final Set<String> WHITELIST = new HashSet<>();
    5757    static {
    5858        WHITELIST.add("outer");
  • trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java

    r8870 r8882  
    9494     * A ? prefix indicates a boolean value, for which the key (instead of the value) is used.
    9595     */
    96     public static final String[] DEFAULT_NAMING_TAGS_FOR_RELATIONS = {"name", "ref", "restriction", "landuse", "natural",
     96    protected static final String[] DEFAULT_NAMING_TAGS_FOR_RELATIONS = {"name", "ref", "restriction", "landuse", "natural",
    9797        "public_transport", ":LocationCode", "note", "?building"};
    9898
  • trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java

    r8840 r8882  
    2020    protected static final int ICON_OFFSET_X_IDX = 4;
    2121    protected static final int ICON_OFFSET_Y_IDX = 5;
    22     public static final String[] ICON_KEYS = {ICON_IMAGE, ICON_WIDTH, ICON_HEIGHT, ICON_OPACITY, ICON_OFFSET_X, ICON_OFFSET_Y};
    23     public static final String[] REPEAT_IMAGE_KEYS = {REPEAT_IMAGE, REPEAT_IMAGE_WIDTH, REPEAT_IMAGE_HEIGHT, REPEAT_IMAGE_OPACITY, null, null};
     22    protected static final String[] ICON_KEYS = {ICON_IMAGE, ICON_WIDTH, ICON_HEIGHT, ICON_OPACITY, ICON_OFFSET_X, ICON_OFFSET_Y};
     23    protected static final String[] REPEAT_IMAGE_KEYS = {REPEAT_IMAGE, REPEAT_IMAGE_WIDTH, REPEAT_IMAGE_HEIGHT, REPEAT_IMAGE_OPACITY,
     24            null, null};
    2425
    2526    public float majorZIndex;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java

    r8880 r8882  
    119119        CONTAINS;
    120120
    121         public static final Set<Op> NEGATED_OPS = EnumSet.of(NEQ, NREGEX);
     121        protected static final Set<Op> NEGATED_OPS = EnumSet.of(NEQ, NREGEX);
    122122
    123123        /**
     
    283283
    284284        public final Pattern pattern;
    285         public static final Set<Op> SUPPORTED_OPS = EnumSet.of(Op.REGEX, Op.NREGEX);
     285        protected static final Set<Op> SUPPORTED_OPS = EnumSet.of(Op.REGEX, Op.NREGEX);
    286286
    287287        public KeyValueRegexpCondition(String k, String v, Op op, boolean considerValAsKey) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java

    r8870 r8882  
    100100     * Set of all supported MapCSS keys.
    101101     */
    102     public static final Set<String> SUPPORTED_KEYS = new HashSet<>();
     102    protected static final Set<String> SUPPORTED_KEYS = new HashSet<>();
    103103    static {
    104104        Field[] declaredFields = StyleKeys.class.getDeclaredFields();
  • trunk/src/org/openstreetmap/josm/io/InvalidXmlCharacterFilter.java

    r8870 r8882  
    2222    private Reader reader;
    2323
    24     public static boolean firstWarning = true;
     24    private static boolean firstWarning = true;
    2525
    26     public static final boolean[] INVALID_CHARS;
     26    private static final boolean[] INVALID_CHARS;
    2727
    2828    static {
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r8846 r8882  
    7979     * Deprecated plugins that are removed on start
    8080     */
    81     public static final Collection<DeprecatedPlugin> DEPRECATED_PLUGINS;
     81    protected static final Collection<DeprecatedPlugin> DEPRECATED_PLUGINS;
    8282    static {
    8383        String IN_CORE = tr("integrated into main program");
  • trunk/src/org/openstreetmap/josm/tools/FontsManager.java

    r8419 r8882  
    2222     * List of fonts embedded into JOSM jar.
    2323     */
    24     public static final Collection<String> INCLUDED_FONTS = Arrays.asList(
     24    private static final Collection<String> INCLUDED_FONTS = Arrays.asList(
    2525            "DroidSans.ttf",
    2626            "DroidSans-Bold.ttf"
Note: See TracChangeset for help on using the changeset viewer.