You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2014/11/13 19:20:06 UTC
[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
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 <dk...@apache.org>
Authored: Thu Nov 13 11:20:37 2014 -0500
Committer: Daniel Kulp <dk...@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()));
+ }
}
}
}