Ignore:
Timestamp:
2013-09-27T01:16:28+02:00 (11 years ago)
Author:
Don-vip
Message:

Sonar/FindBugs - Performance - Method concatenates strings using + in a loop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/history/History.java

    r6084 r6264  
    241241    @Override
    242242    public String toString() {
    243         String result = "History ["
    244                 + (type != null ? "type=" + type + ", " : "") + "id=" + id;
     243        StringBuilder result = new StringBuilder("History ["
     244                + (type != null ? "type=" + type + ", " : "") + "id=" + id);
    245245        if (versions != null) {
    246             result += ", versions=\n";
     246            result.append(", versions=\n");
    247247            for (HistoryOsmPrimitive v : versions) {
    248                 result += "\t" + v + ",\n";
     248                result.append("\t").append(v).append(",\n");
    249249            }
    250250        }
    251         result += "]";
    252         return result;
     251        result.append("]");
     252        return result.toString();
    253253    }
    254254}
Note: See TracChangeset for help on using the changeset viewer.