From 9b27f0563d7e437e345f07b4fb0a423961597d6b Mon Sep 17 00:00:00 2001 From: Mark Hobson Date: Wed, 4 Jan 2017 12:05:28 +0000 Subject: [PATCH] Set Atom feed icon when converting from SyndFeed (#321) --- .../rometools/rome/feed/synd/impl/ConverterForAtom10.java | 5 +++++ rome/src/test/resources/atom_1.0.xml | 1 + 2 files changed, 6 insertions(+) diff --git a/rome/src/main/java/com/rometools/rome/feed/synd/impl/ConverterForAtom10.java b/rome/src/main/java/com/rometools/rome/feed/synd/impl/ConverterForAtom10.java index c752634..8b0cd99 100644 --- a/rome/src/main/java/com/rometools/rome/feed/synd/impl/ConverterForAtom10.java +++ b/rome/src/main/java/com/rometools/rome/feed/synd/impl/ConverterForAtom10.java @@ -414,6 +414,11 @@ public class ConverterForAtom10 implements Converter { aFeed.setContributors(ConverterForAtom03.createAtomPersons(contributors)); } + SyndImage image = syndFeed.getImage(); + if (image != null) { + aFeed.setIcon(image.getUrl()); + } + aFeed.setRights(syndFeed.getCopyright()); aFeed.setUpdated(syndFeed.getPublishedDate()); diff --git a/rome/src/test/resources/atom_1.0.xml b/rome/src/test/resources/atom_1.0.xml index 9d83939..580b3cb 100644 --- a/rome/src/test/resources/atom_1.0.xml +++ b/rome/src/test/resources/atom_1.0.xml @@ -17,6 +17,7 @@ http://example.com author1@example.com + http://example.com/icon atom_1.0.feed.tagline http://example.com/blog/atom_1.0.xml atom_1.0.feed.generator