[
https://issues.apache.org/jira/browse/JENA-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050341#comment-13050341
]
Laurent Pellegrino commented on JENA-71:
----------------------------------------
Unfortunately, this does not work when you have to serialize/deserialize two or
more consecutives Node_ANY nodes:
// serialize
OutputStreamWriter outWriter = new OutputStreamWriter(out);
OutputLangUtils.output(outWriter, Node.ANY, null);
OutputLangUtils.output(outWriter, Node.ANY, null);
// deserialize
Tokenizer tokenizer = TokenizerFactory.makeTokenizerUTF8(in);
tokenizer.next().asNode();
tokenizer.next().asNode();
After the first call to tokenizer.next() the first token is read (and the token
that is read is ANYANY and not only ANY). Then when you call next() a second
time you get a NoSuchElementException whereas you expect an another value. The
patch that is enclosed was taking into account this issue. However, I am not
sure that the patch is the best solution for solving this issue.
> OutputLangUtils cannot encode Node.ANY
> --------------------------------------
>
> Key: JENA-71
> URL: https://issues.apache.org/jira/browse/JENA-71
> Project: Jena
> Issue Type: Bug
> Components: ARQ
> Reporter: Laurent Pellegrino
> Priority: Minor
> Labels: arq, node.any
> Attachments: JENA-71-r1131151.patch
>
>
> As stated in the mailing list
> (http://mail-archives.apache.org/mod_mbox/incubator-jena-dev/201106.mbox/%[email protected]%3E)
> and with JENA-70, Node.ANY cannot be encoded with OutputLangUtils.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira