tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject git commit: TOMEE-1438 delegate equals/hashcode for cxf loader
Date Tue, 04 Nov 2014 21:40:16 GMT
Repository: tomee
Updated Branches:
  refs/heads/develop c130214b9 -> fb3e1d680


TOMEE-1438 delegate equals/hashcode for cxf loader


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

Branch: refs/heads/develop
Commit: fb3e1d68062eafd6627884457bd5da6b95697272
Parents: c130214
Author: Romain Manni-Bucau <rmannibucau@apache.org>
Authored: Tue Nov 4 21:38:15 2014 +0000
Committer: Romain Manni-Bucau <rmannibucau@apache.org>
Committed: Tue Nov 4 21:38:15 2014 +0000

----------------------------------------------------------------------
 .../cxf/transport/util/CxfContainerClassLoader.java     | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/fb3e1d68/server/openejb-cxf-transport/src/main/java/org/apache/openejb/server/cxf/transport/util/CxfContainerClassLoader.java
----------------------------------------------------------------------
diff --git a/server/openejb-cxf-transport/src/main/java/org/apache/openejb/server/cxf/transport/util/CxfContainerClassLoader.java
b/server/openejb-cxf-transport/src/main/java/org/apache/openejb/server/cxf/transport/util/CxfContainerClassLoader.java
index 5b74e8b..8961a17 100644
--- a/server/openejb-cxf-transport/src/main/java/org/apache/openejb/server/cxf/transport/util/CxfContainerClassLoader.java
+++ b/server/openejb-cxf-transport/src/main/java/org/apache/openejb/server/cxf/transport/util/CxfContainerClassLoader.java
@@ -115,18 +115,18 @@ public class CxfContainerClassLoader extends ClassLoader {
     @Override
     public boolean equals(final Object o) {
         final ClassLoader classLoader = tccl();
-        if (classLoader != null) {
-            return classLoader.equals(o);
+        if (classLoader == null || CxfContainerClassLoader.class.isInstance(classLoader))
{ // avoid loop
+            return CONTAINER_LOADER.equals(o);
         }
-        return CONTAINER_LOADER.equals(o);
+        return classLoader.equals(o);
     }
 
     @Override
     public int hashCode() {
         final ClassLoader classLoader = tccl();
-        if (classLoader != null) {
-            return classLoader.hashCode();
+        if (classLoader == null || CxfContainerClassLoader.class.isInstance(classLoader))
{ // avoid loop
+            return CONTAINER_LOADER.hashCode();
         }
-        return CONTAINER_LOADER.hashCode();
+        return classLoader.hashCode();
     }
 }


Mime
View raw message