Caused by: java.lang.NumberFormatException: Invalid int: ""
at java.lang.Integer.invalidInt(Integer.java:138)
at java.lang.Integer.parseInt(Integer.java:358)
at java.lang.Integer.parseInt(Integer.java:334)
at org.mcsoxford.rss.MediaAttributes.intValue(MediaAttributes.java:47)
at org.mcsoxford.rss.RSSHandler$7.set(RSSHandler.java:210)
at org.mcsoxford.rss.RSSHandler.startElement(RSSHandler.java:269)
at org.apache.harmony.xml.ExpatParser.startElement(ExpatParser.java:143)
at org.apache.harmony.xml.ExpatParser.appendBytes(Native Method)
at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:513)
at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:474)
at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:316)
at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:279)
at org.mcsoxford.rss.RSSParser.parse(RSSParser.java:96)
at org.mcsoxford.rss.RSSParser.parse(RSSParser.java:65)
at org.mcsoxford.rss.RSSReader.load(RSSReader.java:107)
Caused by an empty string. The only check done in intValue function is for a null string. Added check for empty string to return the default value for my local version.
if((value == null) || (value.isEmpty())) { return defaultValue; }
Hi,
I was getting the NumberFormatException while loading the rss feed from [http://spectrum.ieee.org/rss/fulltext] as below:
Caused by: java.lang.NumberFormatException: Invalid int: "" at java.lang.Integer.invalidInt(Integer.java:138) at java.lang.Integer.parseInt(Integer.java:358) at java.lang.Integer.parseInt(Integer.java:334) at org.mcsoxford.rss.MediaAttributes.intValue(MediaAttributes.java:47) at org.mcsoxford.rss.RSSHandler$7.set(RSSHandler.java:210) at org.mcsoxford.rss.RSSHandler.startElement(RSSHandler.java:269) at org.apache.harmony.xml.ExpatParser.startElement(ExpatParser.java:143) at org.apache.harmony.xml.ExpatParser.appendBytes(Native Method) at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:513) at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:474) at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:316) at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:279) at org.mcsoxford.rss.RSSParser.parse(RSSParser.java:96) at org.mcsoxford.rss.RSSParser.parse(RSSParser.java:65) at org.mcsoxford.rss.RSSReader.load(RSSReader.java:107)
Caused by an empty string. The only check done in intValue function is for a null string. Added check for empty string to return the default value for my local version.
if((value == null) || (value.isEmpty())) { return defaultValue; }
Regards Nabarun