Ignore:
Timestamp:
2015-10-10T01:40:42+02:00 (4 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
Location:
trunk/src/org/openstreetmap/josm/gui/history
Files:
2 edited

Legend:

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

    r8836 r8846  
    185185
    186186    protected static String getUserUrl(String username) {
    187         return Main.getBaseUserUrl() + "/" +  Utils.encodeUrl(username).replaceAll("\\+", "%20");
     187        return Main.getBaseUserUrl() + '/' +  Utils.encodeUrl(username).replaceAll("\\+", "%20");
    188188    }
    189189
  • trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java

    r8836 r8846  
    203203            if (infoObject instanceof HistoryOsmPrimitive) {
    204204                HistoryOsmPrimitive hp = (HistoryOsmPrimitive) infoObject;
    205                 return hp.getUser() == null ? null : Main.getBaseUserUrl() + "/" + hp.getUser().getName();
     205                return hp.getUser() == null ? null : Main.getBaseUserUrl() + '/' + hp.getUser().getName();
    206206            } else {
    207207                return null;
Note: See TracChangeset for help on using the changeset viewer.