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 1d7a9aa  TOMEE-2616 Upgrade CXF to 3.3.2 Fix compilation issues after 
upgrade Don't need the hacks either now - at least from what I can see
1d7a9aa is described below

commit 1d7a9aa9bd5154cce959d87c684857734d63ce9a
Author: Jean-Louis Monteiro <[email protected]>
AuthorDate: Mon Aug 12 19:07:47 2019 +0200

    TOMEE-2616 Upgrade CXF to 3.3.2
    Fix compilation issues after upgrade
    Don't need the hacks either now - at least from what I can see
---
 .../org/apache/openejb/server/cxf/rs/CxfHacks.java | 62 ----------------------
 .../apache/openejb/server/cxf/rs/CxfRSService.java |  5 --
 2 files changed, 67 deletions(-)

diff --git 
a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfHacks.java
 
b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfHacks.java
deleted file mode 100644
index 054c402..0000000
--- 
a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfHacks.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *     Licensed to the Apache Software Foundation (ASF) under one or more
- *     contributor license agreements.  See the NOTICE file distributed with
- *     this work for additional information regarding copyright ownership.
- *     The ASF licenses this file to You under the Apache License, Version 2.0
- *     (the "License"); you may not use this file except in compliance with
- *     the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *     Unless required by applicable law or agreed to in writing, software
- *     distributed under the License is distributed on an "AS IS" BASIS,
- *     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *     See the License for the specific language governing permissions and
- *     limitations under the License.
- */
-package org.apache.openejb.server.cxf.rs;
-
-import org.apache.cxf.common.util.ClassHelper;
-import org.apache.openejb.loader.SystemInstance;
-import org.apache.openejb.util.LogCategory;
-import org.apache.openejb.util.Logger;
-import org.apache.openejb.util.reflection.Reflections;
-
-public final class CxfHacks {
-    public static void initCxfClassHelper() {
-        if 
(!Boolean.parseBoolean(SystemInstance.get().getProperty("openejb.cxf.ClassHelper.patch",
 "true"))) {
-            return;
-        }
-        try {
-            Reflections.set(ClassHelper.class, null, "HELPER", new 
OpenEJBClassHelper());
-        } catch (final Throwable throwable) {
-            // no more a big deal normally since CXF uses our ClassUnwrapper
-            Logger.getInstance(LogCategory.CXF, CxfHacks.class).info("Can't 
set OpenEJBClassHelper.");
-        }
-    }
-
-    private CxfHacks() {
-        // no-op
-    }
-
-    public static class OpenEJBClassHelper extends ClassHelper {
-        @Override
-        protected Class<?> getRealClassInternal(final Object o) {
-            return getRealClassFromClassInternal(o.getClass());
-        }
-
-        @Override
-        protected Class<?> getRealClassFromClassInternal(final Class<?> cls) {
-            Class<?> c = cls;
-            while (c.getName().contains("$$")) {
-                c = c.getSuperclass();
-            }
-            return c == Object.class ? cls : c;
-        }
-
-        @Override
-        protected Object getRealObjectInternal(final Object o) { // can we do 
anything here? sure we can unwrap ejb but wouldn't mean anything
-            return o;
-        }
-    }
-}
diff --git 
a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRSService.java
 
b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRSService.java
index c455666..702cba1 100644
--- 
a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRSService.java
+++ 
b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRSService.java
@@ -209,7 +209,6 @@ public class CxfRSService extends RESTService {
                     // no-op
                 }
             }
-            hacksOn();
             initCxfProviders(bus);
         } finally {
             if (oldLoader != null) {
@@ -269,10 +268,6 @@ public class CxfRSService extends RESTService {
         }
     }
 
-    private void hacksOn() {
-        CxfHacks.initCxfClassHelper();
-    }
-
     @Override
     public void stop() throws ServiceException {
         super.stop();

Reply via email to