You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Nellya Udovichenko (JIRA)" <ji...@apache.org> on 2007/01/16 17:43:27 UTC
[jira] Commented: (HARMONY-799) [classlib][regex]
java.util.regex.Matcher.hitEnd() return incorrect result when hitting
buffer end
[ https://issues.apache.org/jira/browse/HARMONY-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465200 ]
Nellya Udovichenko commented on HARMONY-799:
--------------------------------------------
The bug isn't reproduced. Could it be closed?
> [classlib][regex] java.util.regex.Matcher.hitEnd() return incorrect result when hitting buffer end
> --------------------------------------------------------------------------------------------------
>
> Key: HARMONY-799
> URL: https://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: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira