From 04b8150c3b29cea8d018b2b5f1ea0e66086d2d3e Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Thu, 7 Jun 2012 09:23:12 +0200 Subject: 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. --- main/src/cgeo/geocaching/apps/cache/navi/AbstractStaticMapsApp.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main') 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; -- cgit v1.1