cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [3/6] cxf git commit: If the requested extension could not be loaded, but was optional, don't add a null to the return collection or an NPE will result
Date Thu, 13 Nov 2014 18:20:06 GMT
If the requested extension could not be loaded, but was optional, don't add a null to the return
collection or an NPE will result


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/8e1dc05f
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8e1dc05f
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8e1dc05f

Branch: refs/heads/master
Commit: 8e1dc05fcd9c2b6b3e9d7cd0eef70471e5cd0b97
Parents: 3d2e276
Author: Daniel Kulp <dkulp@apache.org>
Authored: Thu Nov 13 11:20:37 2014 -0500
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Thu Nov 13 13:19:43 2014 -0500

----------------------------------------------------------------------
 .../java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/8e1dc05f/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java b/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java
index 620a7b9..1a5ee00 100644
--- a/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java
+++ b/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java
@@ -337,7 +337,9 @@ public class ExtensionManagerImpl implements ExtensionManager, ConfiguredBeanLoc
                         if (ex.getLoadedObject() == null) {
                             loadAndRegister(ex);
                         }
-                        ret.add(type.cast(ex.getLoadedObject()));
+                        if (ex.getLoadedObject() != null) {
+                            ret.add(type.cast(ex.getLoadedObject()));
+                        }
                     }                
                 }
             }


Mime
View raw message