Ignore:
Timestamp:
2016-05-30T01:17:28+02:00 (4 years ago)
Author:
Don-vip
Message:

sonar - Performance - Method passes constant String of length 1 to character overridden method + add unit tests/javadoc

Location:
trunk/src/org/openstreetmap/josm/io
Files:
3 edited

Legend:

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

    r10216 r10300  
    241241        CheckParameterUtil.ensureParameterNotNull(changesetIds, "changesetIds");
    242242        if (changesetIds.size() > MAX_CHANGESETS_NUMBER) {
    243             Main.warn("Changeset query built with more than " + MAX_CHANGESETS_NUMBER + " changeset ids (" + changesetIds.size() + ")");
     243            Main.warn("Changeset query built with more than " + MAX_CHANGESETS_NUMBER + " changeset ids (" + changesetIds.size() + ')');
    244244        }
    245245        this.changesetIds = changesetIds;
  • trunk/src/org/openstreetmap/josm/io/MultiFetchOverpassObjectReader.java

    r9669 r10300  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.io;
     3
     4import java.util.Set;
    35
    46import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    57import org.openstreetmap.josm.gui.preferences.server.OverpassServerPreference;
    68import org.openstreetmap.josm.tools.Utils;
    7 
    8 import java.util.Set;
    99
    1010/**
     
    2020            @Override
    2121            public Object apply(Long x) {
    22                 return type.getAPIName() + "(" + x + ");>;";
     22                return type.getAPIName() + '(' + x + ");>;";
    2323            }
    2424        };
    25         final String query = "(" + Utils.join("", Utils.transform(idPackage, toOverpassExpression)) + ");out meta;";
     25        final String query = '(' + Utils.join("", Utils.transform(idPackage, toOverpassExpression)) + ");out meta;";
    2626        return "interpreter?data=" + Utils.encodeUrl(query);
    2727    }
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/VersionHandler.java

    r8846 r10300  
    2323        contentType = "application/json";
    2424        if (args.containsKey("jsonp")) {
    25             content = args.get("jsonp") + " && " + args.get("jsonp") + "(" + content + ')';
     25            content = args.get("jsonp") + " && " + args.get("jsonp") + '(' + content + ')';
    2626        }
    2727    }
Note: See TracChangeset for help on using the changeset viewer.