Issue Details (XML | Word | Printable)

Key: ROME-108
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: rome-issues
Reporter: syntaxerror
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
rome

NumberFormatException in FriendFeed

Created: 10/Oct/08 05:00 AM   Updated: 07/Jan/09 02:50 PM   Resolved: 07/Jan/09 02:50 PM
Component/s: www
Affects Version/s: current
Fix Version/s: milestone 1

Time Tracking:
Not Specified

File Attachments: 1. Text File nfe.patch (1 kB) 13/Dec/08 11:38 AM - martinkurz

Environment:

Operating System: All
Platform: All


Issuezilla Id: 108
Tags:
Participants: martinkurz, nicklothian, rome-issues and syntaxerror


 Description  « Hide

I was trying to parse this feed:
http://friendfeed.com/eszpee?auth=D9E8KDvRDZd1wYj6&format=atom

and it resulted in a NumberFormatException in the method parseLink in
Atom10Parser.java

I found the error with rome 0.9, below is a stack trace from my logfile. Later I
confirmed the error with rome 1.0RC1.

In the 1.0RC1 source, changing line 239 of Atom10Parser.java to this:

if ((att!=null)&&(att!="")) {

solved the problem.

-------------------------------------------------------------

NumberFormatException
Class: java.lang.NumberFormatException
For input string: ""
Error in method forInputString of java.lang.NumberFormatException at line -1 in null
Error in method parseLong of java.lang.Long at line -1 in null
Error in method parseLong of java.lang.Long at line -1 in null
Error in method parseLink of com.sun.syndication.io.impl.Atom10Parser at line
220 in Atom10Parser.java
Error in method parseAlternateLinks of com.sun.syndication.io.impl.Atom10Parser
at line 230 in Atom10Parser.java
Error in method parseEntry of com.sun.syndication.io.impl.Atom10Parser at line
341 in Atom10Parser.java
Error in method parseEntries of com.sun.syndication.io.impl.Atom10Parser at line
319 in Atom10Parser.java
Error in method parseFeed of com.sun.syndication.io.impl.Atom10Parser at line
181 in Atom10Parser.java
Error in method parse of com.sun.syndication.io.impl.Atom10Parser at line 75 in
Atom10Parser.java
Error in method build of com.sun.syndication.io.WireFeedInput at line 252 in
WireFeedInput.java
Error in method build of com.sun.syndication.io.WireFeedInput at line 179 in
WireFeedInput.java
Error in method build of com.sun.syndication.io.SyndFeedInput at line 122 in
SyndFeedInput.java



martinkurz added a comment - 13/Dec/08 11:38 AM

Created an attachment (id=29)
same patch as Isuue 92, parseLong surrounded with try-catch


nicklothian added a comment - 07/Jan/09 02:40 PM

Will fix using the approach in issue 104


nicklothian added a comment - 07/Jan/09 02:50 PM

Fixed