mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-15 22:15:15 -05:00
Log NumberFormatExceptions. Fix whitespace.
This commit is contained in:
parent
5a487f154c
commit
3861e7ca35
@ -321,9 +321,10 @@ public class Storage implements SharedPreferences {
|
|||||||
if (val == null) {
|
if (val == null) {
|
||||||
return defValue;
|
return defValue;
|
||||||
}
|
}
|
||||||
try{
|
try {
|
||||||
return Float.parseFloat(val);
|
return Float.parseFloat(val);
|
||||||
} catch (NumberFormatException nfe){
|
} catch (NumberFormatException nfe) {
|
||||||
|
Log.e(K9.LOG_TAG, "Could not parse float", nfe);
|
||||||
return defValue;
|
return defValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -335,8 +336,9 @@ public class Storage implements SharedPreferences {
|
|||||||
return defValue;
|
return defValue;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return Integer.parseInt(val);
|
return Integer.parseInt(val);
|
||||||
} catch (NumberFormatException nfe){
|
} catch (NumberFormatException nfe) {
|
||||||
|
Log.e(K9.LOG_TAG, "Could not parse int", nfe);
|
||||||
return defValue;
|
return defValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -347,10 +349,11 @@ public class Storage implements SharedPreferences {
|
|||||||
if (val == null) {
|
if (val == null) {
|
||||||
return defValue;
|
return defValue;
|
||||||
}
|
}
|
||||||
try{
|
try {
|
||||||
return Long.parseLong(val);
|
return Long.parseLong(val);
|
||||||
} catch (NumberFormatException nfe){
|
} catch (NumberFormatException nfe) {
|
||||||
return defValue;
|
Log.e(K9.LOG_TAG, "Could not parse long", nfe);
|
||||||
|
return defValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user