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] Updated: (HARMONY-799) [classlib][regex] java.util.regex.Matcher.hitEnd() return incorrect result when hitting buffer end
Date Mon, 18 Dec 2006 14:58:22 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-799?page=all ]

Tim Ellison updated HARMONY-799:
--------------------------------

    Summary: [classlib][regex] java.util.regex.Matcher.hitEnd() return incorrect result when
hitting buffer end  (was: java.util.regex.Matcher.hitEnd() return incorrect result when hitting
buffer end)

> [classlib][regex] java.util.regex.Matcher.hitEnd() return incorrect result when hitting
buffer end
> --------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-799
>                 URL: http://issues.apache.org/jira/browse/HARMONY-799
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>
> Hello,
> java.util.regex.Matcher.hitEnd() will not return expected result when hitting buffer
end. I met this issue when developing java.util.Scanner.
> The following test will pass on RI, but fail on Harmony.
> public void test_hitEnd() throws IOException {
>         Pattern p = Pattern.compile("(\\p{Lower}+$)", Pattern.MULTILINE); //$NON-NLS-1$
>         CharBuffer buf = CharBuffer.allocate(8);
>         buf.position(0);
>         buf.limit(4);
>         String lowerSentence = "lowe3"; //$NON-NLS-1$
>         StringReader stringReader = new StringReader(lowerSentence);
>         stringReader.read(buf);
>         buf.flip();
>         Matcher matcher = p.matcher(buf);
>         assertTrue(matcher.matches());
>         assertTrue(matcher.hitEnd());
> }

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