You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2022/02/22 01:17:00 UTC

[tomee] branch master updated: Fix Null Pointers Introduced with TOMEE-3844

This is an automated email from the ASF dual-hosted git repository.

dblevins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git


The following commit(s) were added to refs/heads/master by this push:
     new ec837ac  Fix Null Pointers Introduced with TOMEE-3844
ec837ac is described below

commit ec837acb03055208315b71f996e67a168b7959f7
Author: David Blevins <db...@tomitribe.com>
AuthorDate: Mon Feb 21 20:15:47 2022 -0500

    Fix Null Pointers Introduced with TOMEE-3844
---
 .../src/main/java/org/apache/openejb/server/cxf/rs/ApplicationData.java | 2 +-
 .../main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/ApplicationData.java b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/ApplicationData.java
index 488cce7..ea57bc1 100644
--- a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/ApplicationData.java
+++ b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/ApplicationData.java
@@ -36,7 +36,7 @@ public class ApplicationData {
         this.path = path;
         this.application = application;
 
-        if (application instanceof InternalApplication) {
+        if (application instanceof InternalApplication && ((InternalApplication) application).getOriginal() != null) {
             final InternalApplication internalApplication = (InternalApplication) application;
             this.applicationClass = internalApplication.getOriginal().getClass();
         } else {
diff --git a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java
index 04016ff..5ac9eaf 100644
--- a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java
+++ b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java
@@ -839,7 +839,7 @@ public class CxfRsHttpListener implements RsHttpListener {
         final Set<Class<?>> declaredClasses = new HashSet<>();
         final Set<Object> declaredSingletons = new HashSet<>();
 
-        if (application instanceof InternalApplication) {
+        if (application instanceof InternalApplication && ((InternalApplication) application).getOriginal() != null) {
             final InternalApplication internalApplication = (InternalApplication) application;
             declaredClasses.addAll(internalApplication.getOriginal().getClasses());
             declaredSingletons.addAll(internalApplication.getOriginal().getSingletons());