cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1311832 - /cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/blueprint/ConfigurerImpl.java
Date Tue, 10 Apr 2012 16:20:50 GMT
Author: dkulp
Date: Tue Apr 10 16:20:50 2012
New Revision: 1311832

URL: http://svn.apache.org/viewvc?rev=1311832&view=rev
Log:
Fix a potential NPE in blueprint configuration

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/blueprint/ConfigurerImpl.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/blueprint/ConfigurerImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/blueprint/ConfigurerImpl.java?rev=1311832&r1=1311831&r2=1311832&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/blueprint/ConfigurerImpl.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/blueprint/ConfigurerImpl.java Tue Apr
10 16:20:50 2012
@@ -131,11 +131,13 @@ public class ConfigurerImpl implements C
                 //Aries blueprint 0.3.x
                 m = ReflectionUtil.findMethod(container.getClass(), "getRepository");
                 Object o = ReflectionUtil.setAccessible(m).invoke(container);
-                m = ReflectionUtil.findMethod(container.getClass(), "getRecipe", String.class);
+                m = ReflectionUtil.findMethod(o.getClass(), "getRecipe", String.class);
                 o = ReflectionUtil.setAccessible(m).invoke(o, bn);  //returns the recipe
-                m = ReflectionUtil.findMethod(o.getClass(), "setProperties", Object.class);
-                if (m != null) {
-                    ReflectionUtil.setAccessible(m).invoke(o, beanInstance);
+                if (o != null) {
+                    m = ReflectionUtil.findMethod(o.getClass(), "setProperties", Object.class);
+                    if (m != null) {
+                        ReflectionUtil.setAccessible(m).invoke(o, beanInstance);
+                    }
                 }
             }
         } catch (InvocationTargetException ite) {



Mime
View raw message