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 dbd179a commit 02381ef
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 02381ef

Please sign in to comment.