You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kristian Waagan (JIRA)" <ji...@apache.org> on 2008/01/28 11:25:35 UTC

[jira] Updated: (DERBY-2760) Clean-up issues for UTF8Util.java

     [ https://issues.apache.org/jira/browse/DERBY-2760?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-2760:
-----------------------------------

    Attachment: derby-2760-3a-extra_tests.diff

'derby-2760-3a-extra_tests.diff' adds a few more tests for UTF8Util.

Of special interest is that using UTF8Util to skip characters from an invalid byte sequence with UTF-8 encoding will/might succeed, depending on the encoding error and the character boundaries. See the test 'testSkippingInvalidEncodingWorks' for an example.

I do not know if this will ever be a problem, because I assume the data has been verified at an earlier stage. If this is not the case, several problems can arise, such as incorrect positioning and a false positive for incorrect encoding (if you end up inside a correctly encoded multi byte character after skipping).

Patch ready for review.

> Clean-up issues for UTF8Util.java
> ---------------------------------
>
>                 Key: DERBY-2760
>                 URL: https://issues.apache.org/jira/browse/DERBY-2760
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Kristian Waagan
>            Priority: Trivial
>             Fix For: 10.4.0.0
>
>         Attachments: derby-2760-1a-remove_unused_method.diff, derby-2760-2a-inner_class.diff, derby-2760-2b-inner_class.diff, derby-2760-3a-extra_tests.diff
>
>
> In DERBY-2646, some improvements to org.apache.derby.iapi.util.UTF8Util were suggested:
>   - remove unused private method isDerbyEOFMarker(), or possibly rewrite it to fit into skipInternal()
>   - skipInternal() should return an instance of a private inner class instead of an array

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.