jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r478962 - /jackrabbit/branches/1.1/jackrabbit/src/main/java/org/apache/jackrabbit/core/security/AuthContext.java
Date Fri, 24 Nov 2006 19:46:17 GMT
Author: jukka
Date: Fri Nov 24 11:46:17 2006
New Revision: 478962

URL: http://svn.apache.org/viewvc?view=rev&rev=478962
Log:
1.1: Merged revision 478672 (JCR-636)

Modified:
    jackrabbit/branches/1.1/jackrabbit/src/main/java/org/apache/jackrabbit/core/security/AuthContext.java

Modified: jackrabbit/branches/1.1/jackrabbit/src/main/java/org/apache/jackrabbit/core/security/AuthContext.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.1/jackrabbit/src/main/java/org/apache/jackrabbit/core/security/AuthContext.java?view=diff&rev=478962&r1=478961&r2=478962
==============================================================================
--- jackrabbit/branches/1.1/jackrabbit/src/main/java/org/apache/jackrabbit/core/security/AuthContext.java
(original)
+++ jackrabbit/branches/1.1/jackrabbit/src/main/java/org/apache/jackrabbit/core/security/AuthContext.java
Fri Nov 24 11:46:17 2006
@@ -138,18 +138,19 @@
                     Collections.EMPTY_MAP,
                     this.options);
 
+            LoginException failure = null;
             try {
-                if (this.module.login()) {
-                    this.module.commit();
+                if (!module.login()) {
+                    failure = new LoginException("Login not confirmed");
                 }
+            } catch (LoginException e) {
+                failure = e;
             }
-            catch (LoginException le) {
-                try {
-                    this.module.abort();
-                } catch (Exception e) {
-                    // Ignore
-                }
-                throw le;
+            if (failure == null) {
+                module.commit();
+            } else {
+                module.abort();
+                throw failure;
             }
         }
 



Mime
View raw message