Hi Martin,

Thanks for the report, this is fixed in SVN trunk.

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Technical Lead ~ http://www.restlet.org
Noelios Technologies ~ http://www.noelios.com



-----Message d'origine-----
De : Martin Svensson [mailto:msv...@gmail.com] 
Envoyé : jeudi 13 mai 2010 18:36
À : discuss@restlet.tigris.org
Objet : Bug in Atom extension Readers

Hi, I am using both the FeedContentReader and EntryContentReader. When
inline content is detected the type will never be set, hence setting it to
text.

Code snippet
..
else if (localName.equalsIgnoreCase("content")) {
                if (this.state == State.FEED_ENTRY_CONTENT) {
                    if (!this.currentEntry.getContent().isExternal()) {
                        String content =
this.currentContentWriter.getWriter()
                                .toString().trim();
                        contentDepth = -1;
                        if ("".equals(content)) {
                            this.currentEntry.setContent(null);
                        } else {
                            currentContent
                                    .setInlineContent(new
StringRepresentation(
                                            content));
                        }
                    }

                    this.state = State.FEED_ENTRY;
                }

I guess the SringRepresentation needs to be set with correct content type as
well.

Thanks,

martin

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=26087
25

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2617646

Reply via email to