abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ugo Cei (JIRA)" <j...@apache.org>
Subject [jira] Created: (ABDERA-70) Link in entry disappears after adding entry to a feed
Date Thu, 04 Oct 2007 11:06:51 GMT
Link in entry disappears after adding entry to a feed
-----------------------------------------------------

                 Key: ABDERA-70
                 URL: https://issues.apache.org/jira/browse/ABDERA-70
             Project: Abdera
          Issue Type: Bug
    Affects Versions: 0.3.0
            Reporter: Ugo Cei


The following code demonstrates the problem:

        Abdera abdera = new Abdera();
        Factory factory = abdera.getFactory();
        Feed feed = factory.newFeed();
        feed.setTitle("Test");
        feed.setId("http://example.com/feed");
        Parser parser = abdera.getParser();
        Document<Entry> doc = parser.parse(this.getClass().getResourceAsStream("/entry.xml"));
        Entry entry = doc.getRoot();
        Link link = factory.newLink();
        link.setHref(entry.getId().toString());
        link.setRel(Link.REL_EDIT);
        entry.addLink(link);
        assertNotNull("Link is null", entry.getLink(Link.REL_EDIT));
        feed.addEntry(entry);
        assertNotNull("Link is null", entry.getLink(Link.REL_EDIT));
        for (Entry e : feed.getEntries()) {
            assertNotNull("Link is null", e.getLink(Link.REL_EDIT));
        }

Note that this happens only when the entry is read and parsed from a file, not when it is
created in memory.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message