You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Richard Liang (JIRA)" <ji...@apache.org> on 2006/06/20 12:13:29 UTC

[jira] Created: (HARMONY-625) java.util.regex.Matcher.find() fails when formatting pattern is ("(?s).*")

java.util.regex.Matcher.find() fails when formatting pattern is ("(?s).*")
--------------------------------------------------------------------------

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

  Components: Classlib  
    Reporter: Richard Liang


Hello,

java.util.regex.Matcher.find() ignores the specified region when formatting pattern is ("(?s).*"). RI 5.0 passes the following test, but Harmony fails.

public void test_find()  {
        Pattern pattern= Pattern.compile("(?s).*");
        
        Matcher matcher=pattern.matcher("abcde");
        matcher.find();
        assertEquals("abcde",matcher.group());
        
        matcher=pattern.matcher("abcde");
        matcher.region(0, 2);
        matcher.find();
        assertEquals("ab",matcher.group());    
}


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


[jira] Commented: (HARMONY-625) java.util.regex.Matcher.find() fails when formatting pattern is ("(?s).*")

Posted by "Nikolay Kuznetsov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-625?page=comments#action_12417119 ] 

Nikolay Kuznetsov commented on HARMONY-625:
-------------------------------------------

The problem here is that matchers right bound set by region method some times is not being taken into account while matching or finding.
This is duplicate of the HARMONY-610 issue, which I've updated with the fix.

> java.util.regex.Matcher.find() fails when formatting pattern is ("(?s).*")
> --------------------------------------------------------------------------
>
>          Key: HARMONY-625
>          URL: http://issues.apache.org/jira/browse/HARMONY-625
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Richard Liang

>
> Hello,
> java.util.regex.Matcher.find() ignores the specified region when formatting pattern is ("(?s).*"). RI 5.0 passes the following test, but Harmony fails.
> public void test_find()  {
>         Pattern pattern= Pattern.compile("(?s).*");
>         
>         Matcher matcher=pattern.matcher("abcde");
>         matcher.find();
>         assertEquals("abcde",matcher.group());
>         
>         matcher=pattern.matcher("abcde");
>         matcher.region(0, 2);
>         matcher.find();
>         assertEquals("ab",matcher.group());    
> }
> 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


[jira] Commented: (HARMONY-625) java.util.regex.Matcher.find() fails when formatting pattern is ("(?s).*")

Posted by "Nikolay Kuznetsov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-625?page=comments#action_12418280 ] 

Nikolay Kuznetsov commented on HARMONY-625:
-------------------------------------------

Richard, could you please verify that this problem is resolved so that this issue could be closed.

Thank you.
   Nik.

> java.util.regex.Matcher.find() fails when formatting pattern is ("(?s).*")
> --------------------------------------------------------------------------
>
>          Key: HARMONY-625
>          URL: http://issues.apache.org/jira/browse/HARMONY-625
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Richard Liang

>
> Hello,
> java.util.regex.Matcher.find() ignores the specified region when formatting pattern is ("(?s).*"). RI 5.0 passes the following test, but Harmony fails.
> public void test_find()  {
>         Pattern pattern= Pattern.compile("(?s).*");
>         
>         Matcher matcher=pattern.matcher("abcde");
>         matcher.find();
>         assertEquals("abcde",matcher.group());
>         
>         matcher=pattern.matcher("abcde");
>         matcher.region(0, 2);
>         matcher.find();
>         assertEquals("ab",matcher.group());    
> }
> 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


[jira] Commented: (HARMONY-625) java.util.regex.Matcher.find() fails when formatting pattern is ("(?s).*")

Posted by "Richard Liang (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-625?page=comments#action_12418373 ] 

Richard Liang commented on HARMONY-625:
---------------------------------------

Yes, Nik.

The fix works fine. It can be closed. 

Thanks a lot

> java.util.regex.Matcher.find() fails when formatting pattern is ("(?s).*")
> --------------------------------------------------------------------------
>
>          Key: HARMONY-625
>          URL: http://issues.apache.org/jira/browse/HARMONY-625
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Richard Liang

>
> Hello,
> java.util.regex.Matcher.find() ignores the specified region when formatting pattern is ("(?s).*"). RI 5.0 passes the following test, but Harmony fails.
> public void test_find()  {
>         Pattern pattern= Pattern.compile("(?s).*");
>         
>         Matcher matcher=pattern.matcher("abcde");
>         matcher.find();
>         assertEquals("abcde",matcher.group());
>         
>         matcher=pattern.matcher("abcde");
>         matcher.region(0, 2);
>         matcher.find();
>         assertEquals("ab",matcher.group());    
> }
> 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


[jira] Closed: (HARMONY-625) java.util.regex.Matcher.find() fails when formatting pattern is ("(?s).*")

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-625?page=all ]
     
Tim Ellison closed HARMONY-625:
-------------------------------

    Resolution: Fixed
     Assign To: Tim Ellison

Was fixed by HARMONY-610.


> java.util.regex.Matcher.find() fails when formatting pattern is ("(?s).*")
> --------------------------------------------------------------------------
>
>          Key: HARMONY-625
>          URL: http://issues.apache.org/jira/browse/HARMONY-625
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Richard Liang
>     Assignee: Tim Ellison

>
> Hello,
> java.util.regex.Matcher.find() ignores the specified region when formatting pattern is ("(?s).*"). RI 5.0 passes the following test, but Harmony fails.
> public void test_find()  {
>         Pattern pattern= Pattern.compile("(?s).*");
>         
>         Matcher matcher=pattern.matcher("abcde");
>         matcher.find();
>         assertEquals("abcde",matcher.group());
>         
>         matcher=pattern.matcher("abcde");
>         matcher.region(0, 2);
>         matcher.find();
>         assertEquals("ab",matcher.group());    
> }
> 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