harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-271) HARMONY-39 java.util.regex.Pattern.split() method discards last trailing empty string
Date Wed, 29 Mar 2006 11:54:19 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-271?page=all ]
Tim Ellison resolved HARMONY-271:

    Resolution: Fixed

Thanks Nikolay,

Patch applied in the regex-beans-math directory at repo revision 389769.

Please check that the patch was applied as you expected.

> HARMONY-39 java.util.regex.Pattern.split() method discards last trailing empty string
> -------------------------------------------------------------------------------------
>          Key: HARMONY-271
>          URL: http://issues.apache.org/jira/browse/HARMONY-271
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>  Environment: Any
>     Reporter: Nikolay Kuznetsov
>     Assignee: Tim Ellison
>     Priority: Minor
>  Attachments: split_patch.diff
> HARMONY-39 Pattern.split() method discards last trailing empty string when given pattern
matches last symbol of input character sequence.
> The same problem appears if the input string is empty. JavaDoc says that if the expression
does not match any part of the input sequence then the resulting array has just one element,
namely this string. Thus in the case of empty input string one element array containing empty
string should be returned, however HARMONY-39 Pattern.split() returns empty array.
> This problem also affects java.lang.String.split() method, because according to JavaDoc
it uses Pattern.split() method.
> The following test demonstrates the problem:
> ",,".split(",", 3).length; //Resulted array will have two elements, while it should have

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message