[
https://issues.apache.org/jira/browse/ABDERA-434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15063796#comment-15063796
]
perry he commented on ABDERA-434:
---------------------------------
This solution works, thanks Andreas!
however, there is one issue when to use "fom-impl-1.2.16.jar", do you have idea
to make it work? Thanks in advance!
- Seems Entry can set category with schema as "null" but is unable to get
category with schema "null":
when to call entry.addCategory(entry.addCategory(null, "a", "a")), it can add a
new category into (org.apache.abdera.model.Entry) entry, and the category
exists in the entry like below:
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:thr="http://purl.org/syndication/thread/1.0"
xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
<category term="a" label="a"></category>
</entry>
But nothing to return when to call entry.getCategories(null), I assume it would
return a category like "<category term="a" label="a"></category>".
- This issue does NOT exist when to use Abdera 1.1.3 with
abdera-parser-1.1.3.jar, neither to use Abdera 0.4.0. Same code can get
category "a" with schema "null".
> java.util.ConcurrentModificationException when to call
> org.apache.abdera.parser.stax.FOMContent.setValue()
> ----------------------------------------------------------------------------------------------------------
>
> Key: ABDERA-434
> URL: https://issues.apache.org/jira/browse/ABDERA-434
> Project: Abdera
> Issue Type: Bug
> Affects Versions: 1.1.3
> Reporter: perry he
>
> We are going to replace Abdera 0.4.0 with 1.1.3, there is an exception thrown
> out in code below, is this a known issue, a bug or something wrong to invoke
> the method? The same code works well with Abdera 0.4.0 and
> axiom-api-1.2.5.jar.
> - code to call:
> Line 1: Content contentElement = atomEntry.getContentElement();
> Line 2: if (contentElement != null && contentElement.getSrc() == null)
> Line 3: entryText = contentElement.getValue();
> Line 4: String updatedContent = MentionsUtil.checkMentions(entryText, id);
> Line 5: contentElement.setValue(updatedContent);
> - exception:
> java.util.ConcurrentModificationException: The current node has been removed
> using a method other than Iterator#remove()
> at
> org.apache.axiom.om.impl.traverse.OMAbstractIterator.hasNext(OMAbstractIterator.java:67)
> at
> org.apache.abdera.parser.stax.FOMElement._removeAllChildren(FOMElement.java:559)
> at
> org.apache.abdera.parser.stax.FOMContent.setValue(FOMContent.java:255)
> at ...
> - runtime values when to throw exception:
> a) contentElement in Line1:
> {noformat}
> <content xmlns="http://www.w3.org/2005/Atom" type="html"><?xml
> version="1.0"
> encoding="UTF-8"?><div>testSaveAppDataDraftToMedia1</div></content>
> {noformat}
> b) updatedContent in Line4:
> {noformat}
> <?xml version="1.0" encoding="UTF-8"?><div>testSaveAppDataDraftToMedia1</div>
> {noformat}
> - our code depends on other jars involved:
> abdera-parser-1.1.3.jar
> axiom-api-1.2.14.jar
> downloaded from https://abdera.apache.org/
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)