[ 
https://issues.apache.org/jira/browse/JENA-1892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17096734#comment-17096734
 ] 

Andy Seaborne commented on JENA-1892:
-------------------------------------

The fixed {{decodeHex} does not call {{String.charAt}} anywhere.

It now has:
{noformat}
            int hi = strBytes[j+1];
            int lo = strBytes[j+2];
{noformat}

In 3.14.0 it did call {{String.charAt}}.

> Non ASCII chars in URIs leads to StringIndexOutOfBoundException
> ---------------------------------------------------------------
>
>                 Key: JENA-1892
>                 URL: https://issues.apache.org/jira/browse/JENA-1892
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Base, TDB
>    Affects Versions: Jena 3.14.0
>            Reporter: Gilles Sérasset
>            Priority: Major
>         Attachments: JenaIRITest.java
>
>
> When a URI uses a non ASCII char, the StrUtils.decodeHex() method will 
> incorrectly decode the URI when stored in TDB and eventually throw a 
> StringIndexOutOfBoundException.
> In the attached JUnit class is a method which will raise the exception.
> Note that if the dataset is not closed and reopened (forcing TDB to store the 
> data on disk and retrieve it), the code works correctly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to