Ignore:
Timestamp:
2015-10-10T14:30:12+02:00 (9 years ago)
Author:
Don-vip
Message:

sonar - squid:S1643 - Strings should not be concatenated using '+' in a loop
sonar - squid:S1640 - Maps with keys that are enum values should be replaced with EnumMap

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/GpxExporter.java

    r8846 r8849  
    318318                if (answer != JOptionPane.OK_OPTION || l.getSelectedIndex() == -1)
    319319                    return;
    320                 String license = "";
     320                StringBuilder license = new StringBuilder();
    321321                for (int i : l.getSelectedIndices()) {
    322322                    if (i == 2) {
    323                         license = "public domain";
     323                        license = new StringBuilder("public domain");
    324324                        break;
    325325                    }
    326                     license += license.isEmpty() ? URLS[i] : ", "+URLS[i];
     326                    if (license.length() > 0) {
     327                        license.append(", ");
     328                    }
     329                    license.append(URLS[i]);
    327330                }
    328                 copyright.setText(license);
     331                copyright.setText(license.toString());
    329332                copyright.setCaretPosition(0);
    330333            }
Note: See TracChangeset for help on using the changeset viewer.