diff options
author | Keith Packard <keithp@keithp.com> | 2016-05-12 23:33:53 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2016-05-12 23:41:55 -0700 |
commit | b1a90adac9f6e2a609ce1ccd6749462bb5c9adbe (patch) | |
tree | 107b6491d8ffc507609f9923353d5454c0664323 /altoslib/AltosParse.java | |
parent | b13037fad0905c5933d1ff579122ba1357b02eea (diff) |
altoslib: Store saved state in version-independent format
Use AltosHashSet for AltosState so that AltosDroid doesn't lose
tracker information when the application is upgraded.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosParse.java')
-rw-r--r-- | altoslib/AltosParse.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/altoslib/AltosParse.java b/altoslib/AltosParse.java index 12499b7b..fbd049ae 100644 --- a/altoslib/AltosParse.java +++ b/altoslib/AltosParse.java @@ -27,6 +27,14 @@ public class AltosParse { public static int parse_int(String v) throws ParseException { try { + return (int) AltosLib.fromdec(v); + } catch (NumberFormatException e) { + throw new ParseException("error parsing int " + v, 0); + } + } + + public static long parse_long(String v) throws ParseException { + try { return AltosLib.fromdec(v); } catch (NumberFormatException e) { throw new ParseException("error parsing int " + v, 0); |