Ignore:
Timestamp:
2015-05-18T02:14:30+02:00 (9 years ago)
Author:
Don-vip
Message:

Sonar - various performance improvements

Location:
trunk/src/org/openstreetmap/josm/io/imagery
Files:
2 edited

Legend:

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

    r8349 r8390  
    263263                    Integer val = null;
    264264                    try {
    265                         val = Integer.parseInt(accumulator.toString());
     265                        val = Integer.valueOf(accumulator.toString());
    266266                    } catch(NumberFormatException e) {
    267267                        val = null;
     
    304304                    Integer tileSize = null;
    305305                    try {
    306                         tileSize  = Integer.parseInt(accumulator.toString());
     306                        tileSize = Integer.valueOf(accumulator.toString());
    307307                    } catch(NumberFormatException e) {
    308308                        tileSize = null;
  • trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java

    r8379 r8390  
    8181        }
    8282        StringBuilder a = new StringBuilder(serviceUrl.getProtocol());
    83         a.append("://")
    84          .append(serviceUrl.getHost());
     83        a.append("://").append(serviceUrl.getHost());
    8584        if (serviceUrl.getPort() != -1) {
    86             a.append(":")
    87              .append(serviceUrl.getPort());
    88         }
    89         a.append(serviceUrl.getPath())
    90          .append("?");
     85            a.append(':').append(serviceUrl.getPort());
     86        }
     87        a.append(serviceUrl.getPath()).append('?');
    9188        if (serviceUrl.getQuery() != null) {
    9289            a.append(serviceUrl.getQuery());
    9390            if (!serviceUrl.getQuery().isEmpty() && !serviceUrl.getQuery().endsWith("&")) {
    94                 a.append("&");
     91                a.append('&');
    9592            }
    9693        }
     
    150147            while ((line = br.readLine()) != null) {
    151148                ba.append(line);
    152                 ba.append("\n");
     149                ba.append('\n');
    153150            }
    154151        }
Note: See TracChangeset for help on using the changeset viewer.