[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

2014-11-14 Thread dkulp
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/224fa3c6
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/224fa3c6
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/224fa3c6

Branch: refs/heads/3.0.x-fixes
Commit: 224fa3c6412db10a451558e67bf0a6913035fa5d
Parents: e4d7661
Author: Daniel Kulp dk...@apache.org
Authored: Thu Nov 13 11:20:37 2014 -0500
Committer: Daniel Kulp dk...@apache.org
Committed: Fri Nov 14 11:27:25 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/224fa3c6/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()));
+}
 }
 }
 }



[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

2014-11-13 Thread dkulp
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()));
+}
 }
 }
 }