Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 13186 invoked from network); 18 Apr 2006 09:56:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Apr 2006 09:56:26 -0000 Received: (qmail 58850 invoked by uid 500); 18 Apr 2006 09:56:19 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 58814 invoked by uid 500); 18 Apr 2006 09:56:19 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 58803 invoked by uid 99); 18 Apr 2006 09:56:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Apr 2006 02:56:18 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Apr 2006 02:56:18 -0700 Received: from brutus (localhost.localdomain [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D1BF27142CA for ; Tue, 18 Apr 2006 09:55:19 +0000 (GMT) Message-ID: <13846514.1145354119856.JavaMail.jira@brutus> Date: Tue, 18 Apr 2006 09:55:19 +0000 (GMT+00:00) From: "Nikolay Kuznetsov (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Commented: (HARMONY-352) tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded In-Reply-To: <35067454.1145092500171.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-352?page=comments#action_12374887 ] Nikolay Kuznetsov commented on HARMONY-352: ------------------------------------------- > Finally, it fixes the index in the exception thrown for one of the tests in order to match the RI behaviour. +++ modules/regex/src/main/java/java/util/regex/Pattern.java (working copy) @@ -592,7 +592,7 @@ if (lexemes.peek() != Lexer.CHAR_RIGHT_PARENTHESIS) throw new PatternSyntaxException(I18n .getMessage("unmatched ("), lexemes.toString(), - lexemes.getIndex()); + lexemes.getIndex()-1); I'm a bit concerned about this fix. This one result in incorrect output for all the case except one under test. The actual cause of incorrect index is that pattern moves index after last index of the pattern string is already read(fix for indices): +++ modules/regex/src/main/java/java/util/regex/Pattern.java (working copy) @@ -733,6 +733,8 @@ term = new RangeSet(cc); } else if (!lexemes.isEmpty()) { term = new CharSet((char) ch); + } else { + break; } Since this fix interfere with HARMONY-350 fix, let me comment on it also, and I'll provide separate fix for this problem. > tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded > ---------------------------------------------------------------- > > Key: HARMONY-352 > URL: http://issues.apache.org/jira/browse/HARMONY-352 > Project: Harmony > Type: Improvement > Components: Classlib > Reporter: Mark Hindess > Assignee: Mikhail Loenko > Priority: Trivial > Attachments: fix.patternsyntaxexceptiontest.diff > > tests/api/java/util/regex/PatternSyntaxExceptionTest is currently excluded because it was testing for incorrect behaviour. This should be fixed. -- 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