mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05:00
Merge pull request #185 from chamonkey/issue3714
Add number format handling to Storage.java
This commit is contained in:
commit
5a487f154c
@ -321,7 +321,11 @@ public class Storage implements SharedPreferences {
|
||||
if (val == null) {
|
||||
return defValue;
|
||||
}
|
||||
try{
|
||||
return Float.parseFloat(val);
|
||||
} catch (NumberFormatException nfe){
|
||||
return defValue;
|
||||
}
|
||||
}
|
||||
|
||||
//@Override
|
||||
@ -330,7 +334,11 @@ public class Storage implements SharedPreferences {
|
||||
if (val == null) {
|
||||
return defValue;
|
||||
}
|
||||
try {
|
||||
return Integer.parseInt(val);
|
||||
} catch (NumberFormatException nfe){
|
||||
return defValue;
|
||||
}
|
||||
}
|
||||
|
||||
//@Override
|
||||
@ -339,7 +347,11 @@ public class Storage implements SharedPreferences {
|
||||
if (val == null) {
|
||||
return defValue;
|
||||
}
|
||||
try{
|
||||
return Long.parseLong(val);
|
||||
} catch (NumberFormatException nfe){
|
||||
return defValue;
|
||||
}
|
||||
}
|
||||
|
||||
//@Override
|
||||
|
Loading…
Reference in New Issue
Block a user