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


Ignore:
Timestamp:
2016-06-23T02:12:21+02:00 (8 years ago)
Author:
Don-vip
Message:

sonar - Performance - Method passes constant String of length 1 to character overridden method

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java

    r10300 r10462  
    863863    public String getExtendedUrl() {
    864864        return imageryType.getTypeString() + (defaultMaxZoom != 0
    865             ? ('['+(defaultMinZoom != 0 ? (Integer.toString(defaultMinZoom) + ',') : "")+defaultMaxZoom+"]") : "") + ':' + url;
     865            ? ('['+(defaultMinZoom != 0 ? (Integer.toString(defaultMinZoom) + ',') : "")+defaultMaxZoom+']') : "") + ':' + url;
    866866    }
    867867
  • trunk/src/org/openstreetmap/josm/gui/MapViewState.java

    r10458 r10462  
    344344        @Override
    345345        public String toString() {
    346             return "MapViewViewPoint [x=" + x + ", y=" + y + "]";
     346            return "MapViewViewPoint [x=" + x + ", y=" + y + ']';
    347347        }
    348348    }
     
    373373        @Override
    374374        public String toString() {
    375             return "MapViewEastNorthPoint [eastNorth=" + eastNorth + "]";
     375            return "MapViewEastNorthPoint [eastNorth=" + eastNorth + ']';
    376376        }
    377377    }
     
    417417
    418418        /**
    419          * Gets the real bounds that enclose this rectangle. 
     419         * Gets the real bounds that enclose this rectangle.
    420420         * This is computed respecting that the borders of this rectangle may not be a straignt line in latlon coordinates.
    421421         * @return The bounds.
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/CacheContentsPanel.java

    r10043 r10462  
    237237                        int row = ret.convertRowIndexToModel(ret.getEditingRow());
    238238                        tableModel.setValueAt("0", row, 1);
    239                         cache.remove(ret.getValueAt(row, 0) + ":");
     239                        cache.remove(ret.getValueAt(row, 0).toString() + ':');
    240240                    }
    241241                });
  • trunk/src/org/openstreetmap/josm/io/OsmHistoryReader.java

    r8846 r10462  
    4040            if (locator == null)
    4141                return "";
    42             return "(" + locator.getLineNumber() + ',' + locator.getColumnNumber() + ')';
     42            return new StringBuilder().append('(').append(locator.getLineNumber())
     43                                      .append(',').append(locator.getColumnNumber()).append(')').toString();
    4344        }
    4445
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r10433 r10462  
    893893                    case typeArchive:
    894894                        if (archive != null) {
    895                             cacheName = "zip:"+archive.hashCode()+":"+cacheName;
     895                            cacheName = "zip:"+archive.hashCode()+':'+cacheName;
    896896                            ImageResource ir = cache.get(cacheName);
    897897                            if (ir != null) return ir;
Note: See TracChangeset for help on using the changeset viewer.