Ignore:
Timestamp:
2015-10-10T01:40:42+02:00 (9 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
File:
1 edited

Legend:

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

    r8650 r8846  
    121121                final String getCapabilitiesQuery = "VERSION=1.1.1&SERVICE=WMS&REQUEST=GetCapabilities";
    122122                if (getCapabilitiesUrl.getQuery() == null) {
    123                     getCapabilitiesUrl = new URL(serviceUrlStr + "?" + getCapabilitiesQuery);
     123                    getCapabilitiesUrl = new URL(serviceUrlStr + '?' + getCapabilitiesQuery);
    124124                } else if (!getCapabilitiesUrl.getQuery().isEmpty() && !getCapabilitiesUrl.getQuery().endsWith("&")) {
    125                     getCapabilitiesUrl = new URL(serviceUrlStr + "&" + getCapabilitiesQuery);
     125                    getCapabilitiesUrl = new URL(serviceUrlStr + '&' + getCapabilitiesQuery);
    126126                } else {
    127127                    getCapabilitiesUrl = new URL(serviceUrlStr + getCapabilitiesQuery);
Note: See TracChangeset for help on using the changeset viewer.