diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2012-04-14 06:22:37 +0200 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2012-04-14 06:22:37 +0200 |
commit | 5c535e5d1841d78334f6a3d15ac6edb85449a18f (patch) | |
tree | 94ea19b843d61ea9a9b0f168a2cf08a68e398e40 | |
parent | 33cb3cb639e182013660a4e7bae30d0f1a9fd136 (diff) | |
download | cgeo-5c535e5d1841d78334f6a3d15ac6edb85449a18f.zip cgeo-5c535e5d1841d78334f6a3d15ac6edb85449a18f.tar.gz cgeo-5c535e5d1841d78334f6a3d15ac6edb85449a18f.tar.bz2 |
refactoring: use locale free format method for numbers
-rw-r--r-- | main/src/cgeo/geocaching/cgData.java | 15 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/export/FieldnoteExport.java | 4 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/geopoint/GeopointFormatter.java | 4 |
3 files changed, 11 insertions, 12 deletions
diff --git a/main/src/cgeo/geocaching/cgData.java b/main/src/cgeo/geocaching/cgData.java index 4a013dd..7911c5f 100644 --- a/main/src/cgeo/geocaching/cgData.java +++ b/main/src/cgeo/geocaching/cgData.java @@ -36,7 +36,6 @@ import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.List; -import java.util.Locale; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -2007,13 +2006,13 @@ public class cgData { } where.append("(latitude >= "); - where.append(String.format((Locale) null, "%.6f", latMin)); + where.append(String.format("%.6f", latMin)); where.append(" and latitude <= "); - where.append(String.format((Locale) null, "%.6f", latMax)); + where.append(String.format("%.6f", latMax)); where.append(" and longitude >= "); - where.append(String.format((Locale) null, "%.6f", lonMin)); + where.append(String.format("%.6f", lonMin)); where.append(" and longitude <= "); - where.append(String.format((Locale) null, "%.6f", lonMax)); + where.append(String.format("%.6f", lonMax)); where.append(')'); return where; } @@ -2642,8 +2641,8 @@ public class cgData { try { Cursor cursor = databaseRO.query( dbTableCaches, - new String[] { "geocode", "(abs(latitude-" + String.format((Locale) null, "%.6f", coords.getLatitude()) + - ") + abs(longitude-" + String.format((Locale) null, "%.6f", coords.getLongitude()) + ")) as dif" }, + new String[] { "geocode", "(abs(latitude-" + String.format("%.6f", coords.getLatitude()) + + ") + abs(longitude-" + String.format("%.6f", coords.getLongitude()) + ")) as dif" }, specifySql.toString(), null, null, @@ -2733,7 +2732,7 @@ public class cgData { /** * Loads the geocodes of caches in a viewport from CacheCache and/or Database - * + * * @param stored * True - query only stored caches, False - query cached ones as well * @param centerLat diff --git a/main/src/cgeo/geocaching/export/FieldnoteExport.java b/main/src/cgeo/geocaching/export/FieldnoteExport.java index 9e6ae1e..0ca6829 100644 --- a/main/src/cgeo/geocaching/export/FieldnoteExport.java +++ b/main/src/cgeo/geocaching/export/FieldnoteExport.java @@ -97,8 +97,8 @@ public class FieldnoteExport extends AbstractExport { private static final int STATUS_UPLOAD = -1; /** - * Instantiates and configurates the task for exporting field notes. - * + * Instantiates and configures the task for exporting field notes. + * * @param caches * The {@link List} of {@link cgCache} to be exported * @param activity diff --git a/main/src/cgeo/geocaching/geopoint/GeopointFormatter.java b/main/src/cgeo/geocaching/geopoint/GeopointFormatter.java index d0baee9..a5d6e9e 100644 --- a/main/src/cgeo/geocaching/geopoint/GeopointFormatter.java +++ b/main/src/cgeo/geocaching/geopoint/GeopointFormatter.java @@ -70,14 +70,14 @@ public class GeopointFormatter return String.format("%.6f %.6f", latSigned, lonSigned); case LAT_LON_DECDEGREE_COMMA: - return String.format((Locale) null, "%.6f,%.6f", latSigned, lonSigned); + return String.format("%.6f,%.6f", latSigned, lonSigned); case LAT_LON_DECMINUTE: return String.format("%c %02d° %06.3f · %c %03d° %06.3f", dmm.latDir, dmm.latDeg, dmm.latMinRaw, dmm.lonDir, dmm.lonDeg, dmm.lonMinRaw); case LAT_LON_DECMINUTE_RAW: - return String.format((Locale) null, "%c %02d° %06.3f %c %03d° %06.3f", + return String.format("%c %02d° %06.3f %c %03d° %06.3f", dmm.latDir, dmm.latDeg, dmm.latMinRaw, dmm.lonDir, dmm.lonDeg, dmm.lonMinRaw); case LAT_LON_DECSECOND: |