cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1397706 - /cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
Date Fri, 12 Oct 2012 19:58:34 GMT
Author: dkulp
Date: Fri Oct 12 19:58:34 2012
New Revision: 1397706

URL: http://svn.apache.org/viewvc?rev=1397706&view=rev
Log:
Merged revisions 1397688 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes

........
  r1397688 | dkulp | 2012-10-12 15:00:40 -0400 (Fri, 12 Oct 2012) | 10 lines

  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.5.x-fixes/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java

Modified: cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java?rev=1397706&r1=1397705&r2=1397706&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
Fri Oct 12 19:58:34 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<MatcherHolder> m = wildCardBeanDefinitions.get(className);
-                            if (m == null) {
-                                m = new ArrayList<MatcherHolder>();
-                                wildCardBeanDefinitions.put(className, m);
+                            try {
+                                Matcher matcher = Pattern.compile(n).matcher("");
+                                List<MatcherHolder> m = wildCardBeanDefinitions.get(className);
+                                if (m == null) {
+                                    m = new ArrayList<MatcherHolder>();
+                                    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); 
                         }



Mime
View raw message