You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2015/11/04 17:25:49 UTC

tomee git commit: NPE protection

Repository: tomee
Updated Branches:
  refs/heads/master ca0436e8f -> cf2692b60


NPE protection


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

Branch: refs/heads/master
Commit: cf2692b602ee0615f21acf5dbf8eecc043838dfd
Parents: ca0436e
Author: Romain Manni-Bucau <rm...@gmail.com>
Authored: Wed Nov 4 08:25:34 2015 -0800
Committer: Romain Manni-Bucau <rm...@gmail.com>
Committed: Wed Nov 4 08:25:34 2015 -0800

----------------------------------------------------------------------
 .../org/apache/openejb/testing/ApplicationComposers.java     | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/cf2692b6/container/openejb-core/src/main/java/org/apache/openejb/testing/ApplicationComposers.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/testing/ApplicationComposers.java b/container/openejb-core/src/main/java/org/apache/openejb/testing/ApplicationComposers.java
index d1b1507..61e0e06 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/testing/ApplicationComposers.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/testing/ApplicationComposers.java
@@ -763,9 +763,11 @@ public class ApplicationComposers {
     private boolean isCdi(final boolean cdi, final Class<?>[] cdiInterceptors,
                           final Class<?>[] cdiAlternatives, final Class<?>[] cdiStereotypes,
                           final Class<?>[] cdiDecorators) {
-        return cdi || cdiAlternatives.length > 0
-            || cdiDecorators.length > 0 || cdiInterceptors.length > 0
-            || cdiStereotypes.length > 0;
+        return cdi
+            || (cdiAlternatives != null && cdiAlternatives.length > 0)
+            || (cdiDecorators != null && cdiDecorators.length > 0)
+            || (cdiInterceptors != null && cdiInterceptors.length > 0)
+            || (cdiStereotypes != null && cdiStereotypes.length > 0);
     }
 
     protected boolean mockCdiContexts() {