Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 819E4D143 for ; Fri, 12 Oct 2012 19:01:27 +0000 (UTC) Received: (qmail 1918 invoked by uid 500); 12 Oct 2012 19:01:27 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 1860 invoked by uid 500); 12 Oct 2012 19:01:27 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 1853 invoked by uid 99); 12 Oct 2012 19:01:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2012 19:01:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2012 19:01:25 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id DED2F2388A68; Fri, 12 Oct 2012 19:00:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1397688 - /cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java Date: Fri, 12 Oct 2012 19:00:40 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121012190040.DED2F2388A68@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Fri Oct 12 19:00:40 2012 New Revision: 1397688 URL: http://svn.apache.org/viewvc?rev=1397688&view=rev Log: Merged revisions 1397685 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/trunk ........ r1397685 | dkulp | 2012-10-12 14:53:41 -0400 (Fri, 12 Oct 2012) | 2 lines [CXF-4391] Trap invalid patterns and ignore them ........ Modified: cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java Modified: cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java?rev=1397688&r1=1397687&r2=1397688&view=diff ============================================================================== --- cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java (original) +++ cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java Fri Oct 12 19:00:40 2012 @@ -31,6 +31,7 @@ import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; +import java.util.regex.PatternSyntaxException; import org.apache.cxf.common.injection.NoJSR250Annotations; import org.apache.cxf.common.logging.LogUtils; @@ -90,14 +91,18 @@ public class ConfigurerImpl extends Bean //old wildcard n = "." + n.replaceAll("\\.", "\\."); } - Matcher matcher = Pattern.compile(n).matcher(""); - List m = wildCardBeanDefinitions.get(className); - if (m == null) { - m = new ArrayList(); - wildCardBeanDefinitions.put(className, m); + try { + Matcher matcher = Pattern.compile(n).matcher(""); + List m = wildCardBeanDefinitions.get(className); + if (m == null) { + m = new ArrayList(); + wildCardBeanDefinitions.put(className, m); + } + MatcherHolder holder = new MatcherHolder(orig, matcher); + m.add(holder); + } catch (PatternSyntaxException npe) { + //not a valid patter, we'll ignore } - MatcherHolder holder = new MatcherHolder(orig, matcher); - m.add(holder); } else { LogUtils.log(LOG, Level.WARNING, "WILDCARD_BEAN_ID_WITH_NO_CLASS_MSG", n); }