From 003e56e9ca7f68a3e90625f24dae7c3cf06b3442 Mon Sep 17 00:00:00 2001 From: Vaibhav Date: Thu, 15 Feb 2024 14:43:34 -0500 Subject: [PATCH] Issue #4 is solved by using a more specific exception, such as UnsupportedOperationException. --- .../dennisguse/opentracks/settings/PreferencesOpenHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/dennisguse/opentracks/settings/PreferencesOpenHelper.java b/src/main/java/de/dennisguse/opentracks/settings/PreferencesOpenHelper.java index 217ef708e..bc3139fb6 100644 --- a/src/main/java/de/dennisguse/opentracks/settings/PreferencesOpenHelper.java +++ b/src/main/java/de/dennisguse/opentracks/settings/PreferencesOpenHelper.java @@ -34,7 +34,8 @@ private void onUpgrade() { switch (i) { case 1 -> upgradeFrom0to1(); case 2 -> upgradeFrom1to2(); - default -> throw new RuntimeException("Not implemented: upgrade to " + version); + default -> throw new UnsupportedOperationException("Upgrade to version " + version + " not implemented"); + } } }