Skip to content

Instantly share code, notes, and snippets.

@uggedal
Created April 8, 2009 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uggedal/91778 to your computer and use it in GitHub Desktop.
Save uggedal/91778 to your computer and use it in GitHub Desktop.
--- src/java/com/sun/syndication/io/impl/NumberParser.java
+++ src/java/com/sun/syndication/io/impl/NumberParser.java
@@ -34,6 +34,8 @@
if (null != str) {
try {
return Long.valueOf(Long.parseLong(str.trim()));
+ } catch (NoSuchMethodError e) {
+ return new Long(Long.parseLong(str.trim()));
} catch (Exception e) {
// :IGNORE:
}
@@ -52,6 +54,8 @@
if (null != str) {
try {
return Integer.valueOf(Integer.parseInt(str.trim()));
+ } catch (NoSuchMethodError e) {
+ return new Integer(Integer.parseInt(str.trim()));
} catch (Exception e) {
// :IGNORE:
}
@@ -69,6 +73,8 @@
if (null != str) {
try {
return Float.valueOf(Float.parseFloat(str.trim()));
+ } catch (NoSuchMethodError e) {
+ new Float(Float.parseFloat(str.trim()));
} catch (Exception e) {
// :IGNORE:
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment