cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r585560 - in /incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring: Jsr250BeanPostProcessor.java SpringBusFactory.java
Date Wed, 17 Oct 2007 16:29:50 GMT
Author: dkulp
Date: Wed Oct 17 09:29:49 2007
New Revision: 585560

URL: http://svn.apache.org/viewvc?rev=585560&view=rev
Log:
Fix SpringBusFactory not actually detecting if a Bus is already defined in the context

Modified:
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java?rev=585560&r1=585559&r2=585560&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java
Wed Oct 17 09:29:49 2007
@@ -41,12 +41,16 @@
     }
 
     public Object postProcessBeforeInitialization(Object bean, String beanId) throws BeansException
{
-        injector.construct(bean);
+        if (bean != null) {
+            injector.construct(bean);
+        }
         return bean;
     }
 
     public void postProcessBeforeDestruction(Object bean, String beanId) {
-        injector.destroy(bean);
+        if (bean != null) {
+            injector.destroy(bean);
+        }
     }
 
 }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java?rev=585560&r1=585559&r2=585560&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java
Wed Oct 17 09:29:49 2007
@@ -56,11 +56,9 @@
     
     private boolean defaultBusNotExists() {
         if (null != context) {
-            context.containsBean(Bus.DEFAULT_BUS_ID);
-            return false;
-        } else {
-            return true;
+            return !context.containsBean(Bus.DEFAULT_BUS_ID);
         }
+        return true;
     }
 
     public Bus createBus(String cfgFile) {



Mime
View raw message