Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 87466 invoked from network); 9 Feb 2007 10:40:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Feb 2007 10:40:26 -0000 Received: (qmail 14315 invoked by uid 500); 9 Feb 2007 10:40:33 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 14248 invoked by uid 500); 9 Feb 2007 10:40:33 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 14239 invoked by uid 99); 9 Feb 2007 10:40:33 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2007 02:40:33 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2007 02:40:25 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B4E1F41095B for ; Fri, 9 Feb 2007 02:40:05 -0800 (PST) Message-ID: <30830528.1171017605738.JavaMail.jira@brutus> Date: Fri, 9 Feb 2007 02:40:05 -0800 (PST) From: "Evgeniya Maenkova (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-3145) [regex] java.util.regex.Pattern failed to compile "(\\P{all})+" pattern unlike RI In-Reply-To: <16584956.1170960245742.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 [ https://issues.apache.org/jira/browse/HARMONY-3145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Evgeniya Maenkova updated HARMONY-3145: --------------------------------------- Attachment: regex.patch unit test added > [regex] java.util.regex.Pattern failed to compile "(\\P{all})+" pattern unlike RI > --------------------------------------------------------------------------------- > > Key: HARMONY-3145 > URL: https://issues.apache.org/jira/browse/HARMONY-3145 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Evgeniya Maenkova > Assigned To: Alexey Petrenko > Attachments: Pattern1.java, regex.patch, regex.patch > > > The test is: [to be attached] > import java.util.regex.Pattern; > public class Pattern1 { > public static void main(String[] args) throws Exception { > int[] codePoint = new int[1]; > Pattern p = Pattern.compile("(\\p{all})+"); > boolean res = true; > int cnt = 0; > String s; > for (int i =0; i < 0x110000; i ++) { > codePoint[0] = i; > s = new String(codePoint, 0, 1); > if (!s.matches(p.toString())) { > cnt++; > res = false; > } > } > System.out.println(res + " " + Integer.toHexString(cnt)); > > p = Pattern.compile("(\\P{all})+"); > res = true; > cnt = 0; > > for (int i =0; i < 0x110000; i ++) { > codePoint[0] = i; > s = new String(codePoint, 0, 1); > if (!s.matches(p.toString())) { > cnt++; > res = false; > } > } > > > System.out.println(res + " " + Integer.toHexString(cnt)); > > } > } > DRL output: > Uncaught exception in main: > java.util.regex.PatternSyntaxException: Character Class \p{all} is not supported near index: 8 > (\p{all})+ > ^ > at java.util.regex.Lexer.movePointer(Lexer.java:564) > at java.util.regex.Lexer.(Lexer.java:225) > at java.util.regex.Pattern.compileImpl(Pattern.java:279) > at java.util.regex.Pattern.compile(Pattern.java:264) > at java.util.regex.Pattern.compile(Pattern.java) > at Pattern1.main(Pattern1.java:5) > RI output: > true 0 > false 110000 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.