Ignore:
Timestamp:
2015-10-10T21:01:42+02:00 (9 years ago)
Author:
Don-vip
Message:

sonar - Unused private method should be removed
sonar - Unused protected methods should be removed
sonar - Sections of code should not be "commented out"
sonar - Empty statements should be removed
sonar - squid:S1172 - Unused method parameters should be removed
sonar - squid:S1481 - Unused local variables should be removed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java

    r8846 r8855  
    99import java.awt.event.FocusEvent;
    1010import java.awt.event.FocusListener;
    11 import java.text.NumberFormat;
    12 import java.text.ParsePosition;
    1311import java.util.ArrayList;
    1412import java.util.Arrays;
     
    235233    }
    236234
    237     protected Double parseDoubleFromUserInput(String input) {
    238         if (input == null) return null;
    239         // remove white space and an optional degree symbol
    240         //
    241         input = input.trim();
    242         input = input.replaceAll(DEG, "");
    243 
    244         // try to parse using the current locale
    245         //
    246         NumberFormat f = NumberFormat.getNumberInstance();
    247         Number n = null;
    248         ParsePosition pp = new ParsePosition(0);
    249         n = f.parse(input, pp);
    250         if (pp.getErrorIndex() >= 0 || pp.getIndex() < input.length()) {
    251             // fall back - try to parse with the english locale
    252             //
    253             pp = new ParsePosition(0);
    254             f = NumberFormat.getNumberInstance(Locale.ENGLISH);
    255             n = f.parse(input, pp);
    256             if (pp.getErrorIndex() >= 0 || pp.getIndex() < input.length())
    257                 return null;
    258         }
    259         return n == null ? null : n.doubleValue();
    260     }
    261 
    262235    protected void parseLatLonUserInput() {
    263236        LatLon latLon;
Note: See TracChangeset for help on using the changeset viewer.