abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James M Snell <jasn...@gmail.com>
Subject Re: svn commit: r433345 - in /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax: FOMElement.java FOMFeed.java
Date Mon, 21 Aug 2006 20:41:02 GMT
That's likely a better approach.  A challenge is that our API doesn't
make it very obvious.  For instance, I'm helping to debug some internal
code that ended up doing the following:

Link link = Factory.INSTANCE.newLink(feed);

The newLink adds the link to the feed when the link is created. The
addLink(link) causes it to be added again.

- James

Garrett Rooney wrote:
> On 8/21/06, jmsnell@apache.org <jmsnell@apache.org> wrote:
>> Author: jmsnell
>> Date: Mon Aug 21 13:20:36 2006
>> New Revision: 433345
>> URL: http://svn.apache.org/viewvc?rev=433345&view=rev
>> Log:
>> If an element already contains a child, don't add it again.
> Why would there be any code doing this?  It seems like the kind of
> case that's only an error, should we really let it happen and slow
> everything down with the extra if, or should we just fix the code that
> tries to do it?
> -garrett

View raw message