You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2012/11/06 07:05:07 UTC

svn commit: r1406050 - /servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java

Author: ffang
Date: Tue Nov  6 06:05:07 2012
New Revision: 1406050

URL: http://svn.apache.org/viewvc?rev=1406050&view=rev
Log:
[SMXCOMP-952]NPE in CxfBcConsumer when ServiceMix is deployed as a web application

Modified:
    servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java

Modified: servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?rev=1406050&r1=1406049&r2=1406050&view=diff
==============================================================================
--- servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java (original)
+++ servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java Tue Nov  6 06:05:07 2012
@@ -420,11 +420,13 @@ public class CxfBcConsumer extends Consu
                 }
                 providedBus = null;
             } else {
-                if (allBuses.keySet().contains(bus.getId())) {
-                    allBuses.remove(bus.getId());
+                if (bus != null) {
+                    if (allBuses.keySet().contains(bus.getId())) {
+                        allBuses.remove(bus.getId());
+                    }
+                    bus.shutdown(true);
+                    bus = null;
                 }
-                bus.shutdown(true);
-                bus = null;
             }
         }
         super.deactivate();