Changeset 10238 in josm for trunk/src


Ignore:
Timestamp:
2016-05-17T02:32:56+02:00 (9 years ago)
Author:
Don-vip
Message:

sonar - squid:S1873 - "static final" arrays should be "private"

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java

    r10044 r10238  
    9595     * A ? prefix indicates a boolean value, for which the key (instead of the value) is used.
    9696     */
    97     protected static final String[] DEFAULT_NAMING_TAGS_FOR_RELATIONS = {"name", "ref", "restriction", "landuse", "natural",
     97    private static final String[] DEFAULT_NAMING_TAGS_FOR_RELATIONS = {"name", "ref", "restriction", "landuse", "natural",
    9898        "public_transport", ":LocationCode", "note", "?building"};
    9999
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/NodeElement.java

    r10198 r10238  
    9292    public static final StyleElementList DEFAULT_NODE_STYLELIST_TEXT = new StyleElementList(NodeElement.SIMPLE_NODE_ELEMSTYLE,
    9393            BoxTextElement.SIMPLE_NODE_TEXT_ELEMSTYLE);
     94
     95    private static final String[] ICON_KEYS = {ICON_IMAGE, ICON_WIDTH, ICON_HEIGHT, ICON_OPACITY, ICON_OFFSET_X, ICON_OFFSET_Y};
    9496
    9597    protected NodeElement(Cascade c, MapImage mapImage, Symbol symbol, float defaultMajorZindex, RotationAngle rotationAngle) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/RepeatImageElement.java

    r9371 r10238  
    2222    public float phase;
    2323    public LineImageAlignment align;
     24
     25    private static final String[] REPEAT_IMAGE_KEYS = {REPEAT_IMAGE, REPEAT_IMAGE_WIDTH, REPEAT_IMAGE_HEIGHT, REPEAT_IMAGE_OPACITY,
     26            null, null};
    2427
    2528    public RepeatImageElement(Cascade c, MapImage pattern, float offset, float spacing, float phase, LineImageAlignment align) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/StyleElement.java

    r10001 r10238  
    2424    protected static final int ICON_OFFSET_X_IDX = 4;
    2525    protected static final int ICON_OFFSET_Y_IDX = 5;
    26     protected static final String[] ICON_KEYS = {ICON_IMAGE, ICON_WIDTH, ICON_HEIGHT, ICON_OPACITY, ICON_OFFSET_X, ICON_OFFSET_Y};
    27     protected static final String[] REPEAT_IMAGE_KEYS = {REPEAT_IMAGE, REPEAT_IMAGE_WIDTH, REPEAT_IMAGE_HEIGHT, REPEAT_IMAGE_OPACITY,
    28             null, null};
    2926
    3027    public float majorZIndex;
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r10216 r10238  
    220220     * List of unmaintained plugins. Not really up-to-date as the vast majority of plugins are not maintained after a few months, sadly...
    221221     */
    222     static final String[] UNMAINTAINED_PLUGINS = new String[] {
     222    static final List<String> UNMAINTAINED_PLUGINS = Collections.unmodifiableList(Arrays.asList(
    223223        "gpsbabelgui",
    224224        "Intersect_way",
     
    226226        "LaneConnector",           // See #11468, #11518, https://github.com/TrifanAdrian/LanecConnectorPlugin/issues/1
    227227        "Remove.redundant.points"  // See #11468, #11518, https://github.com/bularcasergiu/RemoveRedundantPoints (not even created an issue...)
    228     };
     228    ));
    229229
    230230    /**
     
    14861486     */
    14871487    public static Set<String> getDeprecatedAndUnmaintainedPlugins() {
    1488         Set<String> result = new HashSet<>(DEPRECATED_PLUGINS.size() + UNMAINTAINED_PLUGINS.length);
     1488        Set<String> result = new HashSet<>(DEPRECATED_PLUGINS.size() + UNMAINTAINED_PLUGINS.size());
    14891489        for (DeprecatedPlugin dp : DEPRECATED_PLUGINS) {
    14901490            result.add(dp.name);
    14911491        }
    1492         result.addAll(Arrays.asList(UNMAINTAINED_PLUGINS));
     1492        result.addAll(UNMAINTAINED_PLUGINS);
    14931493        return result;
    14941494    }
Note: See TracChangeset for help on using the changeset viewer.