geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r156618 - geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/ContextManager.java
Date Wed, 09 Mar 2005 04:52:45 GMT
Author: adc
Date: Tue Mar  8 20:52:43 2005
New Revision: 156618

URL: http://svn.apache.org/viewcvs?view=rev&rev=156618
Log:
Fixed getCallerPrincipal()

Modified:
    geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/ContextManager.java

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/ContextManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/ContextManager.java?view=diff&r1=156617&r2=156618
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/ContextManager.java
(original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/ContextManager.java
Tue Mar  8 20:52:43 2005
@@ -130,19 +130,18 @@
         return context.context;
     }
 
-    public static Principal getCurrentPrincipal() {
+    public static Principal getCurrentPrincipal(Subject callerSubject) {
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) sm.checkPermission(GET_CONTEXT);
 
-        Object caller = currentCaller.get();
-        if (caller == null) {
+        if (callerSubject == null) {
             return new Principal() {
                 public String getName() {
                     return "";
                 }
             };
         }
-        Context context = (Context) subjectContexts.get(currentCaller.get());
+        Context context = (Context) subjectContexts.get(callerSubject);
 
         assert context != null : "No registered context";
 



Mime
View raw message