Repository navigation
Conversation
ROME 2.1.0 is the latest release on Maven Central. Its classes target Java 8 (class file version 52), so it runs on Roller's Java 17 baseline. Roller depends only on the core rome artifact, with rome-utils 2.1.0 coming in transitively; the modules ROME 2 removed (rome-fetcher, rome-propono, rome-certiorem) were already gone from Roller. ROME 2 makes an Atom feed's rel="self" link the SyndFeed link, where 1.x used the first alternate link. Planet stores that link as the subscription's site URL, so Atom subscriptions would have linked to the feed instead of the blog. RomeFeedFetcher now takes the first alternate link from the feed's links and falls back to the feed link, which is still the channel link for RSS. Nothing else Planet relies on changed: dates are still java.util.Date, rome.properties keeps the same keys and the custom parsers, converters and content module still load, and SyndFeedInput still refuses DOCTYPEs and external entities by default. RomeFeedFetcherLocalTest serves Atom, RSS 2.0 and RSS 0.91 feeds from a loopback server and pins the site URL, entry dates and time zones, authors, content, categories, the conditional fetch, the Planet plugins registered in rome.properties, and the refusal of a feed with a DOCTYPE. All six tests also pass on ROME 1.19.0 with the previous fetcher, and the site URL check fails on 2.1.0 without the fix.
snoopdave
left a comment
There was a problem hiding this comment.
PR-Review: no issues. The ROME 2 getLink() change is caught and tested with a loopback server, including the DOCTYPE refusal. Minor: RomeFeedFetcher.java:167-171 takes the first blank or alternate link whatever its type, so a feed that lists an application/atom+xml or JSON alternate before its text/html one gets the wrong site URL. Preferring type="text/html" (or a blank type), then falling back to the first alternate, would cover it.
A feed that listed an Atom, RSS or JSON alternate before its text/html one got that feed as its site URL. siteURL() now takes the first alternate whose type is text/html or blank, and falls back to the first alternate of any type, then the feed link. Suggested in review.
|
fc2351c takes your suggestion. |
# Conflicts: # CHANGES.md
Upgrades ROME, the feed library Planet uses, from 1.19.0 to 2.1.0. ROME 2.1.0 targets Java 8 (class file version 52), keeps
java.util.Datein its feed model, and renames no packages. The modules it dropped (fetcher, Propono, certiorem) aren't used by Roller.One behaviour change mattered. For Atom 1.0 feeds,
SyndFeed.getLink()now returns therel="self"link (the feed's own URL) instead of the first alternate link (rometools/rome#538). Planet stores that value as the subscription's site URL, so Atom subscriptions would have linked to the feed instead of the blog.RomeFeedFetcher.siteURL()now takes the first link whoserelis blank oralternate, and falls back togetLink(), which is still the channel link for RSS.RomeFeedFetcherLocalTestserves feeds from a JDKHttpServeron a random loopback port, so it doesn't need the network. It covers:pubDate, thedc:datefallback,dc:creatorandcontent:encodedrome.propertiesAll of it also passes on ROME 1.19.0 with the old code. On 2.1.0 without the fix, the site URL test fails.
mvn testpasses (665 tests). Planet's feed parsing keeps ROME's own hardened parser setup, which is unchanged in 2.1.0.