harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Liang (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-759) java.util.regex.Matcher.region(int start, int end) treats end index as inclusive instead of exclusive
Date Wed, 05 Jul 2006 06:47:29 GMT
java.util.regex.Matcher.region(int start, int end) treats end index as inclusive instead of
exclusive
-----------------------------------------------------------------------------------------------------

         Key: HARMONY-759
         URL: http://issues.apache.org/jira/browse/HARMONY-759
     Project: Harmony
        Type: Bug

  Components: Classlib  
    Reporter: Richard Liang


Hello Nik,

Use pattern 'a\n' to match 'aa\nb.b' and set match region to [0, 2), find() method should
return false.

The following test case passes on RI, but fails on Harmony.

public void test_find() {
        Pattern p = Pattern.compile("a\nb*");
        Matcher matcher = p.matcher("aa\nb.b");
        matcher.region(0, 2);
        assertFalse(matcher.find());
    }

Best regards,
Richard.

-- 
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