Ignore:
Timestamp:
2013-04-20T15:50:18+02:00 (7 years ago)
Author:
Don-vip
Message:

fix potential bugs detected by FindBugs

Location:
trunk/src/org/openstreetmap/josm/data/projection
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java

    r5548 r5889  
    366366
    367367    public static double parseDouble(Map<String, String> parameters, String parameterName) throws ProjectionConfigurationException {
     368        if (!parameters.containsKey(parameterName))
     369            throw new IllegalArgumentException(tr("Unknown parameter ''{0}''", parameterName));
    368370        String doubleStr = parameters.get(parameterName);
    369         if (doubleStr == null && parameters.containsKey(parameterName))
     371        if (doubleStr == null)
    370372            throw new ProjectionConfigurationException(
    371373                    tr("Expected number argument for parameter ''{0}''", parameterName));
  • trunk/src/org/openstreetmap/josm/data/projection/Projections.java

    r5634 r5889  
    165165        if (proj != null) return proj;
    166166        ProjectionChoice pc = allProjectionChoicesByCode.get(code);
    167         if (pc != null) {
     167        if (pc == null) {
    168168            Pair<String, String> pair = inits.get(code);
    169169            if (pair == null) return null;
     
    183183        return Collections.unmodifiableCollection(allCodes);
    184184    }
    185 
    186185}
Note: See TracChangeset for help on using the changeset viewer.