harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-799) [classlib][regex] java.util.regex.Matcher.hitEnd() return incorrect result when hitting buffer end
Date Tue, 13 Mar 2007 15:46:09 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexei Zakharov closed HARMONY-799.
-----------------------------------

    Assignee: Alexei Zakharov

> [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
>         Assigned To: Alexei Zakharov
>         Attachments: HARMONY-799-test.patch
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message