aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2012-06-07 09:23:12 +0200
committerSamuel Tardieu <sam@rfc1149.net>2012-06-07 09:23:12 +0200
commit04b8150c3b29cea8d018b2b5f1ea0e66086d2d3e (patch)
treecc9232f57a0bc21fe99371128dcfd3d573b663ec
parent00ebf4407eb0797e6f57cb1644f416e3251f253d (diff)
downloadcgeo-04b8150c3b29cea8d018b2b5f1ea0e66086d2d3e.zip
cgeo-04b8150c3b29cea8d018b2b5f1ea0e66086d2d3e.tar.gz
cgeo-04b8150c3b29cea8d018b2b5f1ea0e66086d2d3e.tar.bz2
Fix #1735: safely uppercase string even if it is null
Since we check for the null string once if has been uppercased, it makes sense to use a method which allows null in and out.
-rw-r--r--main/src/cgeo/geocaching/apps/cache/navi/AbstractStaticMapsApp.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/AbstractStaticMapsApp.java b/main/src/cgeo/geocaching/apps/cache/navi/AbstractStaticMapsApp.java
index ff61404..266acfd 100644
--- a/main/src/cgeo/geocaching/apps/cache/navi/AbstractStaticMapsApp.java
+++ b/main/src/cgeo/geocaching/apps/cache/navi/AbstractStaticMapsApp.java
@@ -47,7 +47,7 @@ abstract class AbstractStaticMapsApp extends AbstractNavigationApp {
protected static boolean invoke(final Activity activity, final cgCache cache, final cgWaypoint waypoint, final boolean download) {
final ILogable logable = cache != null && cache.getListId() != 0 ? cache : waypoint;
- final String geocode = logable.getGeocode().toUpperCase();
+ final String geocode = StringUtils.upperCase(logable.getGeocode());
if (geocode == null) {
ActivityMixin.showToast(activity, getString(R.string.err_detail_no_map_static));
return true;