diff --git a/android/phoenix/src/com/retroarch/browser/coremanager/CoreManagerActivity.java b/android/phoenix/src/com/retroarch/browser/coremanager/CoreManagerActivity.java index f36f5cd4bc..d7e9019487 100644 --- a/android/phoenix/src/com/retroarch/browser/coremanager/CoreManagerActivity.java +++ b/android/phoenix/src/com/retroarch/browser/coremanager/CoreManagerActivity.java @@ -75,7 +75,7 @@ public final class CoreManagerActivity extends ActionBarActivity implements TabL // Do nothing. Not used. } - // Adapter for the CoreView ViewPager class. + // Adapter for the core manager ViewPager. private final class ViewPagerAdapter extends FragmentPagerAdapter { /** diff --git a/android/phoenix/src/com/retroarch/browser/preferences/util/ConfigFile.java b/android/phoenix/src/com/retroarch/browser/preferences/util/ConfigFile.java index 8c57d1b0c0..7bddf0b4d5 100644 --- a/android/phoenix/src/com/retroarch/browser/preferences/util/ConfigFile.java +++ b/android/phoenix/src/com/retroarch/browser/preferences/util/ConfigFile.java @@ -215,14 +215,14 @@ public final class ConfigFile * * @return the Integer value associated with the given key. */ - public int getInt(String key) throws NumberFormatException + public int getInt(String key) { String str = getString(key); if (str != null) return Integer.parseInt(str); else - throw new NumberFormatException(); + throw new IllegalArgumentException("Config key '" + key + "' is invalid."); } /** @@ -232,14 +232,14 @@ public final class ConfigFile * * @return the double value associated with the given key. */ - public double getDouble(String key) throws NumberFormatException + public double getDouble(String key) { String str = getString(key); if (str != null) return Double.parseDouble(str); else - throw new NumberFormatException(); + throw new IllegalArgumentException("Config key '" + key + "' is invalid."); } /** @@ -249,14 +249,14 @@ public final class ConfigFile * * @return the float value associated with the given key. */ - public float getFloat(String key) throws NumberFormatException + public float getFloat(String key) { String str = getString(key); if (str != null) return Float.parseFloat(str); else - throw new NumberFormatException(); + throw new IllegalArgumentException("Config key '" + key + "' is invalid."); } /** @@ -270,6 +270,9 @@ public final class ConfigFile { String str = getString(key); - return Boolean.parseBoolean(str); + if (str != null) + return Boolean.parseBoolean(str); + else + throw new IllegalArgumentException("Config key '" + key + "' is invalid."); } }