diff options
| author | Bananeweizen <Bananeweizen@gmx.de> | 2014-01-01 14:08:11 +0100 |
|---|---|---|
| committer | Bananeweizen <Bananeweizen@gmx.de> | 2014-01-01 14:08:11 +0100 |
| commit | 9bed9f046731e71f4ef79502ceec46f9502b4de2 (patch) | |
| tree | 720a3d7653596bc48fb817cbc8bcbef7029af51c /main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java | |
| parent | 08fde3648e575a7eead15bd830b4936451275e14 (diff) | |
| download | cgeo-9bed9f046731e71f4ef79502ceec46f9502b4de2.zip cgeo-9bed9f046731e71f4ef79502ceec46f9502b4de2.tar.gz cgeo-9bed9f046731e71f4ef79502ceec46f9502b4de2.tar.bz2 | |
refactoring: remove bad default case statements
For methods returning directly from the switch case, at least Eclipse
still needs a useless return value outside of the switch statement. This
has been handled by IllegalStateExceptions after the switch.
Diffstat (limited to 'main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java')
| -rw-r--r-- | main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java | 5 |
1 files changed, 1 insertions, 4 deletions
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) { |
