jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r158072 - incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SessionImpl.java
Date Fri, 18 Mar 2005 14:00:27 GMT
Author: stefan
Date: Fri Mar 18 06:00:26 2005
New Revision: 158072

URL: http://svn.apache.org/viewcvs?view=rev&rev=158072
Log:
JCR-72 Session.impersonate non-functional: forgot to remove IMPERSONATOR_ATTRIBUTE again

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SessionImpl.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SessionImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SessionImpl.java?view=diff&r1=158071&r2=158072
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SessionImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SessionImpl.java Fri Mar
18 06:00:26 2005
@@ -60,8 +60,8 @@
 import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
-import javax.jcr.Workspace;
 import javax.jcr.SimpleCredentials;
+import javax.jcr.Workspace;
 import javax.jcr.lock.LockException;
 import javax.jcr.nodetype.ConstraintViolationException;
 import javax.jcr.version.VersionException;
@@ -74,12 +74,12 @@
 import java.io.PrintStream;
 import java.security.AccessControlException;
 import java.security.Principal;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
-import java.util.ArrayList;
 
 /**
  * A <code>SessionImpl</code> ...
@@ -698,6 +698,9 @@
             String msg = "impersonate failed";
             log.error(msg, nswe);
             throw new RepositoryException(msg, nswe);
+        } finally {
+            // make sure IMPERSONATOR_ATTRIBUTE is removed
+            creds.removeAttribute(IMPERSONATOR_ATTRIBUTE);
         }
     }
 



Mime
View raw message