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 Fri, 14 Nov 2014 16:27:43 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/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 <dkulp@apache.org>
Authored: Thu Nov 13 11:20:37 2014 -0500
Committer: Daniel Kulp <dkulp@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()));
+                        }
                     }                
                 }
             }


Mime
View raw message