[
https://issues.apache.org/jira/browse/JENA-347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andy Seaborne closed JENA-347.
------------------------------
> NodecSSE decode problem
> -----------------------
>
> Key: JENA-347
> URL: https://issues.apache.org/jira/browse/JENA-347
> Project: Apache Jena
> Issue Type: Bug
> Components: TDB
> Affects Versions: TDB 0.9.1, TDB 0.9.4
> Environment: Confirmed in Scala 2.9.2 REPL
> Reporter: Svatopluk Šperka
> Assignee: Andy Seaborne
> Priority: Minor
> Attachments: NodecSSEProof.scala
>
>
> Decode method of NodecSSE should be the inverse function of encode but it's
> not. In case of URI, decode create NodeURI from the string obtained from the
> whole ByteBuffer passed to decode. This results in URL that is not equal to
> the original URI (it's longer as it contains nonsensical suffix). I've
> temporarily fixed that by trimming the decoded string before creating URI:
> if ( str.startsWith("<") )
> {
> // Do directly.
> // (is it quicker?)
> str = str.trim(); // !!!!!!!!!!! this line inserted
> str = str.substring(1,str.length()-1) ;
> str = StrUtils.unescapeString(str) ;
> str = StrUtils.decodeHex(str, MarkerChar) ;
> return Node.createURI(str) ;
> }
> I'm using NodecSSE to encode Nodes in order to transfer them through network.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira