geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r769753 - /geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintContextImpl.java
Date Wed, 29 Apr 2009 11:28:19 GMT
Author: gnodet
Date: Wed Apr 29 11:28:18 2009
New Revision: 769753

URL: http://svn.apache.org/viewvc?rev=769753&view=rev
Log:
Fix possible NPE

Modified:
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintContextImpl.java

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintContextImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintContextImpl.java?rev=769753&r1=769752&r2=769753&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintContextImpl.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/BlueprintContextImpl.java
Wed Apr 29 11:28:18 2009
@@ -376,14 +376,18 @@
     private void registerAllServices() {
         for (ServiceMetadata service : getExportedServicesMetadata()) {
             ServiceRegistrationProxy proxy = (ServiceRegistrationProxy) getComponent(service.getId());
-            proxy.register();
+            if (proxy != null) {
+                proxy.register();
+            }
         }
     }
     
     private void unregisterAllServices() {
         for (ServiceMetadata service : getExportedServicesMetadata()) {
             ServiceRegistrationProxy proxy = (ServiceRegistrationProxy) getComponent(service.getId());
-            proxy.unregister();
+            if (proxy != null) {
+                proxy.unregister();
+            }
         }
     }
     
@@ -396,6 +400,9 @@
         if (metadata == null) {
             throw new NoSuchComponentException(name);
         }
+        if (objectGraph == null) {
+            return null;
+        }
         return objectGraph.create(name);
     }
 



Mime
View raw message