You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2013/09/29 23:48:09 UTC

svn commit: r1527414 - /webservices/axiom/trunk/modules/axiom-api/src/main/java/org/apache/axiom/locator/OSGiOMMetaFactoryLocator.java

Author: veithen
Date: Sun Sep 29 21:48:08 2013
New Revision: 1527414

URL: http://svn.apache.org/r1527414
Log:
Removed unnecessary null check.

Modified:
    webservices/axiom/trunk/modules/axiom-api/src/main/java/org/apache/axiom/locator/OSGiOMMetaFactoryLocator.java

Modified: webservices/axiom/trunk/modules/axiom-api/src/main/java/org/apache/axiom/locator/OSGiOMMetaFactoryLocator.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-api/src/main/java/org/apache/axiom/locator/OSGiOMMetaFactoryLocator.java?rev=1527414&r1=1527413&r2=1527414&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-api/src/main/java/org/apache/axiom/locator/OSGiOMMetaFactoryLocator.java (original)
+++ webservices/axiom/trunk/modules/axiom-api/src/main/java/org/apache/axiom/locator/OSGiOMMetaFactoryLocator.java Sun Sep 29 21:48:08 2013
@@ -75,18 +75,16 @@ final class OSGiOMMetaFactoryLocator ext
     }
 
     public void removedBundle(Bundle bundle, BundleEvent event, Object object) {
-        if (object != null) {
-            for (Iterator it = ((List)object).iterator(); it.hasNext(); ) {
-                RegisteredImplementation registeredImplementation = (RegisteredImplementation)it.next();
-                apiBundleContext.ungetService(registeredImplementation.getReference());
-                registeredImplementation.getRegistration().unregister();
-                synchronized (this) {
-                    implementations.remove(registeredImplementation.getImplementation());
-                }
-            }
+        for (Iterator it = ((List)object).iterator(); it.hasNext(); ) {
+            RegisteredImplementation registeredImplementation = (RegisteredImplementation)it.next();
+            apiBundleContext.ungetService(registeredImplementation.getReference());
+            registeredImplementation.getRegistration().unregister();
             synchronized (this) {
-                loadImplementations(implementations);
+                implementations.remove(registeredImplementation.getImplementation());
             }
         }
+        synchronized (this) {
+            loadImplementations(implementations);
+        }
     }
 }