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 2017/06/14 13:13:00 UTC

tomee git commit: TOMEE-2044 ensure we can target delegate unwrapping the service

Repository: tomee
Updated Branches:
  refs/heads/master 97c27de3b -> e756f0c75


TOMEE-2044 ensure we can target delegate unwrapping the service


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

Branch: refs/heads/master
Commit: e756f0c7534d61e3f8552123e801771719917589
Parents: 97c27de
Author: rmannibucau <rm...@apache.org>
Authored: Wed Jun 14 15:12:54 2017 +0200
Committer: rmannibucau <rm...@apache.org>
Committed: Wed Jun 14 15:12:54 2017 +0200

----------------------------------------------------------------------
 .../java/org/apache/openejb/server/UnwrappbleServerService.java   | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/e756f0c7/server/openejb-server/src/main/java/org/apache/openejb/server/UnwrappbleServerService.java
----------------------------------------------------------------------
diff --git a/server/openejb-server/src/main/java/org/apache/openejb/server/UnwrappbleServerService.java b/server/openejb-server/src/main/java/org/apache/openejb/server/UnwrappbleServerService.java
index 96d18f2..2eb061d 100644
--- a/server/openejb-server/src/main/java/org/apache/openejb/server/UnwrappbleServerService.java
+++ b/server/openejb-server/src/main/java/org/apache/openejb/server/UnwrappbleServerService.java
@@ -22,6 +22,9 @@ public abstract class UnwrappbleServerService implements ServerService, Unwrappa
         if (type.isAssignableFrom(getClass())) {
             return type.cast(this);
         }
+        if (type.isInstance(getDelegate())) {
+            return type.cast(getDelegate());
+        }
         return Unwrappable.class.isInstance(getDelegate()) ? Unwrappable.class.cast(getDelegate()).unwrap(type) : null;
     }