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-773) regex Patter2Test.testCompile4 is incorrect
Date Fri, 07 Jul 2006 17:09:30 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-773?page=all ]
     
Tim Ellison resolved HARMONY-773:
---------------------------------

    Resolution: Fixed

Thanks Nikolay,

Patch applied to REGEX module at repo revision r419927.

Please check that it was applied as you expected.

p.s.  Absolute path names are ok, don't feel obliged to send patch twice.


> regex Patter2Test.testCompile4 is incorrect
> -------------------------------------------
>
>          Key: HARMONY-773
>          URL: http://issues.apache.org/jira/browse/HARMONY-773
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>  Environment: All
>     Reporter: Nikolay Kuznetsov
>     Assignee: Tim Ellison
>  Attachments: Pattern2Test.patch, Pattern2Test.patch
>
> The test Patter2Test.testCompile4 for regex package works incorrectly.
> Input sequence modification after creation of the matcher is invalid action, subsequent
matcher.reset(test)
> call should be used to update matcher with new string:
> ...
> Matcher matcher = pattern.matcher(text);
> ...
> if (found) {
> VVVVVVVVVVVVVVVVVVVVVVVV
>     // modify text
>     text.delete(0, text.length());
>     text.append("Text have been changed.");
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> }
> found = matcher.find();
> The spec does not specifies this case directly, but there are some considerations:
> 1) RI does not support this:
> I can easily modify this testcase to make RI fail with IndexOutOfBounsException(change
"Text have been changed"  to "AA");
> 2) Correct behaviour is not specified:
> What about concurrent modification, what should happen with ranges, should input sequense
be copied of length checks should be performed prior to every input string access operation
and so on. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message