diff options
7 files changed, 5 insertions, 16 deletions
diff --git a/main/src/cgeo/geocaching/AboutActivity.java b/main/src/cgeo/geocaching/AboutActivity.java index b9f198a..b47091b 100644 --- a/main/src/cgeo/geocaching/AboutActivity.java +++ b/main/src/cgeo/geocaching/AboutActivity.java @@ -179,9 +179,8 @@ public class AboutActivity extends AbstractViewPagerActivity<AboutActivity.Page> return new ContributorsViewCreator(); case LICENSE: return new LicenseViewCreator(); - default: - throw new IllegalArgumentException(); } + throw new IllegalStateException(); // cannot happen, when switch case is enum complete } @Override diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java index 079562e..4b0fc93 100644 --- a/main/src/cgeo/geocaching/CacheDetailActivity.java +++ b/main/src/cgeo/geocaching/CacheDetailActivity.java @@ -2206,9 +2206,8 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc case IMAGES: return new ImagesViewCreator(); - default: - throw new IllegalArgumentException(); } + throw new IllegalStateException(); // cannot happen as long as switch case is enum complete } static void updateOfflineBox(final View view, final Geocache cache, final Resources res, diff --git a/main/src/cgeo/geocaching/CacheListActivity.java b/main/src/cgeo/geocaching/CacheListActivity.java index be9b59c..3d2ad0c 100644 --- a/main/src/cgeo/geocaching/CacheListActivity.java +++ b/main/src/cgeo/geocaching/CacheListActivity.java @@ -1632,8 +1632,6 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA title = pocket_name; loader = new PocketGeocacheListLoader(app, guid); break; - default: - throw new IllegalStateException(); } setTitle(title); showProgress(true); diff --git a/main/src/cgeo/geocaching/TrackableActivity.java b/main/src/cgeo/geocaching/TrackableActivity.java index 6752344..973f8c2 100644 --- a/main/src/cgeo/geocaching/TrackableActivity.java +++ b/main/src/cgeo/geocaching/TrackableActivity.java @@ -316,9 +316,8 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi return new DetailsViewCreator(); case LOGS: return new TrackableLogsViewCreator(this, trackable); - default: - throw new IllegalArgumentException(); } + throw new IllegalStateException(); // cannot happen as long as switch case is enum complete } @Override diff --git a/main/src/cgeo/geocaching/geopoint/GeopointFormatter.java b/main/src/cgeo/geocaching/geopoint/GeopointFormatter.java index 67f5ebb..a6965f9 100644 --- a/main/src/cgeo/geocaching/geopoint/GeopointFormatter.java +++ b/main/src/cgeo/geocaching/geopoint/GeopointFormatter.java @@ -109,9 +109,8 @@ public class GeopointFormatter { return String.format(Locale.getDefault(), "%c %03d %06.3f", rgp.getLonDir(), rgp.getLonDeg(), rgp.getLonMinRaw()); } - default: - throw new IllegalArgumentException(); } + throw new IllegalStateException(); // cannot happen, if switch case is enum complete } } diff --git a/main/src/cgeo/geocaching/ui/LoggingUI.java b/main/src/cgeo/geocaching/ui/LoggingUI.java index 30c719e..1423da2 100644 --- a/main/src/cgeo/geocaching/ui/LoggingUI.java +++ b/main/src/cgeo/geocaching/ui/LoggingUI.java @@ -105,8 +105,6 @@ public class LoggingUI extends AbstractUIFactory { case CLEAR_LOG: cache.clearOfflineLog(); break; - default: - throw new IllegalStateException(); } } else { cache.logOffline(activity, logTypeEntry.logType); diff --git a/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java b/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java index ea7554d..e00993f 100644 --- a/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java +++ b/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java @@ -216,9 +216,8 @@ public class CoordinatesInputDialog extends NoTitleDialog { eLonSec.setText(addZeros(gp.getLonSec(), 2)); eLonSub.setText(addZeros(gp.getLonSecFrac(), 3)); break; - default: - throw new IllegalStateException(); } + throw new IllegalStateException(); // cannot happen if switch case is enum complete } private static String addZeros(final int value, final int len) { @@ -361,8 +360,6 @@ public class CoordinatesInputDialog extends NoTitleDialog { break; case Plain: // This case has been handled above - default: - throw new IllegalArgumentException(); } } catch (final Geopoint.ParseException e) { if (signalError) { |
