Round trip ATOM failures because of SyModuleGenerator and missing updateBase

Description

I've been doing some basic testing of ROME 1.0RC1 to parse feeds from the wild
and then normalize them as ATOM 1.0 to stream into other systems (which will
also use ROME.

I've discovered an interesting use case where ROME can do the following:
1) fetch a URL for an RSS feed and parse it to produce a SyndFeed.
2) output that SyndFeed to a file as ATOM 1.0
3) parse that ATOM 1.0 file as a new SyndFeed object.
But what ROME cannot do (in some cases) is:
4) re-output the current SyndFeed object back to a new file. *FAIL*

The problem seems to stem from SyModule and the "updateBase" property.

In the feed I found which contains the problem, updatedBase is not present.
this doesn't cause any problems for steps #1-3 above, but does cause a problem
for step#4.

It seems like either:
a) the parsing code for SyModule is too forgiving and should fail in step#1
b) the generating code for SyModule is too forgiving and should fail in step#2
c) the generating code for SyModule isn;t forgiving enough and should succeed
in step#4

...either way, it seems like the parsing and generating code are out of sink
with each other.

Feed URL where problem was found...
http://feeds.feedburner.com/Passionemobile

Output from test code (will attach)...

firstAtom.xml exists, skiping fetch
Round trip from firstAtom.xml to secondAtom.xml
Exception in thread "main" java.lang.NullPointerException
at java.util.Calendar.setTime(Calendar.java:1032)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:785)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:778)
at java.text.DateFormat.format(DateFormat.java:314)
at com.sun.syndication.io.impl.DateParser.formatW3CDateTime(DateParser.java:280)
at
com.sun.syndication.io.impl.SyModuleGenerator.generate(SyModuleGenerator.java:80)
at
com.sun.syndication.io.impl.ModuleGenerators.generateModules(ModuleGenerators.java:56)
at
com.sun.syndication.io.impl.BaseWireFeedGenerator.generateFeedModules(BaseWireFeedGenerator.java:62)
at com.sun.syndication.io.impl.Atom10Generator.addFeed(Atom10Generator.java:110)
at
com.sun.syndication.io.impl.Atom10Generator.populateFeed(Atom10Generator.java:101)
at com.sun.syndication.io.impl.Atom10Generator.generate(Atom10Generator.java:79)
at com.sun.syndication.io.WireFeedOutput.outputJDom(WireFeedOutput.java:207)
at com.sun.syndication.io.WireFeedOutput.output(WireFeedOutput.java:147)
at com.sun.syndication.io.WireFeedOutput.output(WireFeedOutput.java:126)
at com.sun.syndication.io.SyndFeedOutput.output(SyndFeedOutput.java:79)
at RomeRoundTripTest.main(RomeRoundTripTest.java:36)

Environment

None

Status

Assignee

ROME Jira Lead

Reporter

hossman

Labels

None

Participants

None

Fix versions

Affects versions

current

Priority

Major