Ignore:
Timestamp:
2015-10-10T01:40:42+02:00 (11 years ago)
Author:
Don-vip
Message:

sonar - fb-contrib - minor performance improvements:

  • Method passes constant String of length 1 to character overridden method
  • Method needlessly boxes a boolean constant
  • Method uses iterator().next() on a List to get the first item
  • Method converts String to boxed primitive using excessive boxing
  • Method converts String to primitive using excessive boxing
  • Method creates array using constants
  • Class defines List based fields but uses them like Sets
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlCondition.java

    r8510 r8846  
    2222    public String getKey() {
    2323        if (value != null)
    24             return "n" + key + "=" + value;
     24            return 'n' + key + '=' + value;
    2525        else if (boolValue != null)
    26             return "b" + key  + "=" + OsmUtils.getNamedOsmBoolean(boolValue);
     26            return 'b' + key  + '=' + OsmUtils.getNamedOsmBoolean(boolValue);
    2727        else
    28             return "x" + key;
     28            return 'x' + key;
    2929    }
    3030
     
    3535    @Override
    3636    public String toString() {
    37       return "Rule["+key+","+(boolValue != null ? "b="+boolValue : "v="+value)+"]";
     37      return "Rule["+key+','+(boolValue != null ? "b="+boolValue : "v="+value)+']';
    3838    }
    3939
Note: See TracChangeset for help on using the changeset viewer.