aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1719864 - /aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java
Date Mon, 14 Dec 2015 08:20:51 GMT
Author: gnodet
Date: Mon Dec 14 08:20:51 2015
New Revision: 1719864

URL: http://svn.apache.org/viewvc?rev=1719864&view=rev
Log:
[ARIES-1477] NPE in NamespaceHandlerRegistryImpl

Modified:
    aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java

Modified: aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java?rev=1719864&r1=1719863&r2=1719864&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java
(original)
+++ aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java
Mon Dec 14 08:20:51 2015
@@ -122,8 +122,13 @@ public class NamespaceHandlerRegistryImp
                 LOGGER.warn("Error registering NamespaceHandler", e);
             }
         } else {
-            LOGGER.warn("Error resolving NamespaceHandler, null Service obtained from tracked
ServiceReference {} for bundle {}/{}",
-                    reference.toString(), reference.getBundle().getSymbolicName(), reference.getBundle().getVersion());
+            Bundle bundle = reference.getBundle();
+            // If bundle is null, the service has already been unregistered,
+            // so do nothing in that case
+            if (bundle != null) {
+                LOGGER.warn("Error resolving NamespaceHandler, null Service obtained from
tracked ServiceReference {} for bundle {}/{}",
+                        reference.toString(), reference.getBundle().getSymbolicName(), reference.getBundle().getVersion());
+            }
         }
         return handler;
     }



Mime
View raw message