Skip to content

Commit

Permalink
Removed blogUrl param from showBlogPreview(), added new routines for …
Browse files Browse the repository at this point in the history
…following/unfollowing blogs & feeds
  • Loading branch information
nbradbury committed Feb 9, 2015
1 parent 9c1c94c commit 01379c8
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,17 @@ public static int stringToInt(String s, int defaultValue) {
return defaultValue;
}
}

public static long stringToLong(String s) {
return stringToLong(s, 0L);
}
public static long stringToLong(String s, long defaultValue) {
if (s == null)
return defaultValue;
try {
return Long.valueOf(s);
} catch (NumberFormatException e) {
return defaultValue;
}
}
}

0 comments on commit 01379c8

Please sign in to comment.