You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rz...@apache.org on 2023/11/15 11:14:18 UTC

(tomee) branch main updated: Remove the obsolete EJBContext methods getEnvironment, getCallerIdentity and isCallerInRole(Identity). Add overrides to prevent future removals going undetected.

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 5ce33b6345 Remove the obsolete EJBContext methods getEnvironment, getCallerIdentity and isCallerInRole(Identity). Add overrides to prevent future removals going undetected.
5ce33b6345 is described below

commit 5ce33b6345ae93590c9415d0a0cdb8b7cf55be22
Author: Eirik Bjorsnos <ei...@gmail.com>
AuthorDate: Thu Apr 20 08:54:41 2023 +0200

    Remove the obsolete EJBContext methods getEnvironment, getCallerIdentity and isCallerInRole(Identity). Add overrides to prevent future removals going undetected.
---
 .../java/org/apache/openejb/core/BaseContext.java    | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

diff --git a/container/openejb-core/src/main/java/org/apache/openejb/core/BaseContext.java b/container/openejb-core/src/main/java/org/apache/openejb/core/BaseContext.java
index ee3f65be10..b91eca9ca3 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/core/BaseContext.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/core/BaseContext.java
@@ -46,11 +46,9 @@ import jakarta.transaction.SystemException;
 import jakarta.transaction.UserTransaction;
 import java.io.ObjectStreamException;
 import java.io.Serializable;
-import java.security.Identity;
 import java.security.Principal;
 import java.util.Collection;
 import java.util.Map;
-import java.util.Properties;
 
 
 /**
@@ -89,6 +87,7 @@ public abstract class BaseContext implements EJBContext, Serializable {
         return new IllegalStateException(call + " cannot be called in " + operation);
     }
 
+    @Override
     public Map<String, Object> getContextData() {
         doCheck(Call.getContextData);
         return ThreadContext.getThreadContext().get(InvocationContext.class).getContextData();
@@ -101,6 +100,7 @@ public abstract class BaseContext implements EJBContext, Serializable {
         }
     }
 
+    @Override
     public EJBHome getEJBHome() {
         final ThreadContext threadContext = ThreadContext.getThreadContext();
         final BeanContext di = threadContext.getBeanContext();
@@ -108,6 +108,7 @@ public abstract class BaseContext implements EJBContext, Serializable {
         return di.getEJBHome();
     }
 
+    @Override
     public EJBLocalHome getEJBLocalHome() {
         final ThreadContext threadContext = ThreadContext.getThreadContext();
         final BeanContext di = threadContext.getBeanContext();
@@ -115,6 +116,7 @@ public abstract class BaseContext implements EJBContext, Serializable {
         return di.getEJBLocalHome();
     }
 
+    @Override
     public Principal getCallerPrincipal() {
         doCheck(Call.getCallerPrincipal);
         Principal callerPrincipal = getCallerPrincipal(securityService);
@@ -239,19 +241,7 @@ public abstract class BaseContext implements EJBContext, Serializable {
         return di.isBeanManagedTransaction();
     }
 
-
-    public final Properties getEnvironment() {
-        throw new UnsupportedOperationException();
-    }
-
-    public final Identity getCallerIdentity() {
-        throw new UnsupportedOperationException();
-    }
-
-    public final boolean isCallerInRole(final Identity identity) {
-        throw new UnsupportedOperationException();
-    }
-
+    @Override
     public Object lookup(final String name) {
         final ThreadContext threadContext = ThreadContext.getThreadContext();
         final BeanContext beanContext = threadContext.getBeanContext();