Ignore:
Timestamp:
2017-03-02T01:59:40+01:00 (3 years ago)
Author:
Don-vip
Message:

sonar - pmd:UseStringBufferForStringAppends

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r11620 r11649  
    789789                return null;
    790790
    791             String prefix = "";
    792             if (isDisabled)
    793                 prefix = "dis:"+prefix;
     791            String prefix = isDisabled ? "dis:" : "";
    794792            if (name.startsWith("data:")) {
    795793                String url = name;
  • trunk/src/org/openstreetmap/josm/tools/bugreport/ReportedException.java

    r10985 r11649  
    135135
    136136    private static String niceThreadName(Thread thread) {
    137         String name = "Thread: " + thread.getName() + " (" + thread.getId() + ')';
     137        StringBuilder name = new StringBuilder("Thread: ").append(thread.getName()).append(" (").append(thread.getId()).append(')');
    138138        ThreadGroup threadGroup = thread.getThreadGroup();
    139139        if (threadGroup != null) {
    140             name += " of " + threadGroup.getName();
    141         }
    142         return name;
     140            name.append(" of ").append(threadGroup.getName());
     141        }
     142        return name.toString();
    143143    }
    144144
Note: See TracChangeset for help on using the changeset viewer.