You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2021/05/12 10:26:09 UTC

[tomee] branch master updated: Many ways to wrap a null application. So make sure we don't try to inject into something null with the recurcive call.

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

jlmonteiro 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 8dd89da  Many ways to wrap a null application. So make sure we don't try to inject into something null with the recurcive call.
8dd89da is described below

commit 8dd89daec484a84b2dd8e0f97a29f87a4d4fd3a4
Author: Jean-Louis Monteiro <jl...@tomitribe.com>
AuthorDate: Wed May 12 12:25:49 2021 +0200

    Many ways to wrap a null application. So make sure we don't try to inject into something null with the recurcive call.
---
 .../java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java     | 5 +++++
 1 file changed, 5 insertions(+)

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 23f3f93..6abf1e9 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
@@ -822,6 +822,11 @@ public class CxfRsHttpListener implements RsHttpListener {
      * com/sun/ts/tests/jaxrs/spec/context/server/JAXRSClient#applicationInjectionTest_from_standalone
      */
     public static void injectApplication(final Application application, final JAXRSServerFactoryBean factory) {
+
+        if (application == null) {
+            return;
+        }
+
         /*
          * We may have wrapped the Application instance in an InternalApplication.  If so, unwrap
          * it and do the injection on that instance.