geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r592348 - in /geronimo/server: branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/ trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/
Date Tue, 06 Nov 2007 09:35:18 GMT
Author: vamsic007
Date: Tue Nov  6 01:35:17 2007
New Revision: 592348

URL: http://svn.apache.org/viewvc?rev=592348&view=rev
Log:
Yes...  clear() is the method I was looking for :o))

Modified:
    geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificateChainLoginModule.java
    geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificatePropertiesFileLoginModule.java
    geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/LDAPLoginModule.java
    geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/PropertiesFileLoginModule.java
    geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/SQLLoginModule.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificateChainLoginModule.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificatePropertiesFileLoginModule.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/LDAPLoginModule.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/PropertiesFileLoginModule.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/SQLLoginModule.java

Modified: geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificateChainLoginModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificateChainLoginModule.java?rev=592348&r1=592347&r2=592348&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificateChainLoginModule.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificateChainLoginModule.java
Tue Nov  6 01:35:17 2007
@@ -129,7 +129,7 @@
         if(loginSucceeded) {
             // Clear out the private state
             principal = null;
-            allPrincipals.retainAll(Collections.EMPTY_SET);
+            allPrincipals.clear();
         }
         return loginSucceeded;
     }
@@ -142,7 +142,7 @@
             // Remove principals added by this LoginModule
             subject.getPrincipals().removeAll(allPrincipals);
         }
-        allPrincipals.retainAll(Collections.EMPTY_SET);
+        allPrincipals.clear();
         return true;
     }
 

Modified: geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificatePropertiesFileLoginModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificatePropertiesFileLoginModule.java?rev=592348&r1=592347&r2=592348&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificatePropertiesFileLoginModule.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificatePropertiesFileLoginModule.java
Tue Nov  6 01:35:17 2007
@@ -32,7 +32,6 @@
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
-import java.util.Collection;
 import javax.security.auth.Subject;
 import javax.security.auth.callback.Callback;
 import javax.security.auth.callback.CallbackHandler;
@@ -216,7 +215,7 @@
         if(loginSucceeded) {
             // Clear out the private state
             principal = null;
-            allPrincipals.retainAll(Collections.EMPTY_SET);
+            allPrincipals.clear();
         }
         return loginSucceeded;
     }
@@ -229,7 +228,7 @@
             // Remove principals added by this LoginModule
             subject.getPrincipals().removeAll(allPrincipals);
         }
-        allPrincipals.retainAll(Collections.EMPTY_SET);
+        allPrincipals.clear();
         return true;
     }
 

Modified: geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/LDAPLoginModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/LDAPLoginModule.java?rev=592348&r1=592347&r2=592348&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/LDAPLoginModule.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/LDAPLoginModule.java
Tue Nov  6 01:35:17 2007
@@ -173,7 +173,7 @@
             // Clear out the private state
             cbUsername = null;
             cbPassword = null;
-            groups.retainAll(Collections.EMPTY_SET);
+            groups.clear();
             throw new FailedLoginException();
         }
 
@@ -186,13 +186,13 @@
             // Clear out the private state
             cbUsername = null;
             cbPassword = null;
-            groups.retainAll(Collections.EMPTY_SET);
+            groups.clear();
             throw e;
         } catch (Exception e) {
             // Clear out the private state
             cbUsername = null;
             cbPassword = null;
-            groups.retainAll(Collections.EMPTY_SET);
+            groups.clear();
             throw (LoginException) new LoginException("LDAP Error").initCause(e);
         }
 
@@ -219,7 +219,7 @@
         // Clear out the private state
         cbUsername = null;
         cbPassword = null;
-        groups.retainAll(Collections.EMPTY_SET);
+        groups.clear();
 
         return loginSucceeded;
     }
@@ -229,8 +229,8 @@
             // Clear out the private state
             cbUsername = null;
             cbPassword = null;
-            groups.retainAll(Collections.EMPTY_SET);
-            allPrincipals.retainAll(Collections.EMPTY_SET);
+            groups.clear();
+            allPrincipals.clear();
         }
         return loginSucceeded;
     }
@@ -240,12 +240,12 @@
         loginSucceeded = false;
         cbUsername = null;
         cbPassword = null;
-        groups.retainAll(Collections.EMPTY_SET);
+        groups.clear();
         if(!subject.isReadOnly()) {
             // Remove principals added by this LoginModule
             subject.getPrincipals().removeAll(allPrincipals);
         }
-        allPrincipals.retainAll(Collections.EMPTY_SET);
+        allPrincipals.clear();
         return true;
     }
 

Modified: geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/PropertiesFileLoginModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/PropertiesFileLoginModule.java?rev=592348&r1=592347&r2=592348&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/PropertiesFileLoginModule.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/PropertiesFileLoginModule.java
Tue Nov  6 01:35:17 2007
@@ -243,7 +243,7 @@
             // Clear out the private state
             username = null;
             password = null;
-            allPrincipals.retainAll(Collections.EMPTY_SET);
+            allPrincipals.clear();
         }
         return loginSucceeded;
     }
@@ -257,7 +257,7 @@
             // Remove principals added by this LoginModule
             subject.getPrincipals().removeAll(allPrincipals);
         }
-        allPrincipals.retainAll(Collections.EMPTY_SET);
+        allPrincipals.clear();
         return true;
     }
 

Modified: geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/SQLLoginModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/SQLLoginModule.java?rev=592348&r1=592347&r2=592348&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/SQLLoginModule.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/SQLLoginModule.java
Tue Nov  6 01:35:17 2007
@@ -296,19 +296,19 @@
             // Clear out the private state
             cbUsername = null;
             cbPassword = null;
-            groups.retainAll(Collections.EMPTY_SET);
+            groups.clear();
             throw e;
         } catch (SQLException sqle) {
             // Clear out the private state
             cbUsername = null;
             cbPassword = null;
-            groups.retainAll(Collections.EMPTY_SET);
+            groups.clear();
             throw (LoginException) new LoginException("SQL error").initCause(sqle);
         } catch (Exception e) {
             // Clear out the private state
             cbUsername = null;
             cbPassword = null;
-            groups.retainAll(Collections.EMPTY_SET);
+            groups.clear();
             throw (LoginException) new LoginException("Could not access datasource").initCause(e);
         }
 
@@ -335,7 +335,7 @@
         // Clear out the private state
         cbUsername = null;
         cbPassword = null;
-        groups.retainAll(Collections.EMPTY_SET);
+        groups.clear();
 
         return loginSucceeded;
     }
@@ -345,8 +345,8 @@
             // Clear out the private state
             cbUsername = null;
             cbPassword = null;
-            groups.retainAll(Collections.EMPTY_SET);
-            allPrincipals.retainAll(Collections.EMPTY_SET);
+            groups.clear();
+            allPrincipals.clear();
         }
         return loginSucceeded;
     }
@@ -356,12 +356,12 @@
         loginSucceeded = false;
         cbUsername = null;
         cbPassword = null;
-        groups.retainAll(Collections.EMPTY_SET);
+        groups.clear();
         if(!subject.isReadOnly()) {
             // Remove principals added by this LoginModule
             subject.getPrincipals().removeAll(allPrincipals);
         }
-        allPrincipals.retainAll(Collections.EMPTY_SET);
+        allPrincipals.clear();
         return true;
     }
 

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificateChainLoginModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificateChainLoginModule.java?rev=592348&r1=592347&r2=592348&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificateChainLoginModule.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificateChainLoginModule.java
Tue Nov  6 01:35:17 2007
@@ -129,7 +129,7 @@
         if(loginSucceeded) {
             // Clear out the private state
             principal = null;
-            allPrincipals.retainAll(Collections.EMPTY_SET);
+            allPrincipals.clear();
         }
         return loginSucceeded;
     }
@@ -142,7 +142,7 @@
             // Remove principals added by this LoginModule
             subject.getPrincipals().removeAll(allPrincipals);
         }
-        allPrincipals.retainAll(Collections.EMPTY_SET);
+        allPrincipals.clear();
         return true;
     }
 

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificatePropertiesFileLoginModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificatePropertiesFileLoginModule.java?rev=592348&r1=592347&r2=592348&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificatePropertiesFileLoginModule.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/CertificatePropertiesFileLoginModule.java
Tue Nov  6 01:35:17 2007
@@ -32,7 +32,6 @@
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
-import java.util.Collection;
 import javax.security.auth.Subject;
 import javax.security.auth.callback.Callback;
 import javax.security.auth.callback.CallbackHandler;
@@ -216,7 +215,7 @@
         if(loginSucceeded) {
             // Clear out the private state
             principal = null;
-            allPrincipals.retainAll(Collections.EMPTY_SET);
+            allPrincipals.clear();
         }
         return loginSucceeded;
     }
@@ -229,7 +228,7 @@
             // Remove principals added by this LoginModule
             subject.getPrincipals().removeAll(allPrincipals);
         }
-        allPrincipals.retainAll(Collections.EMPTY_SET);
+        allPrincipals.clear();
         return true;
     }
 

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/LDAPLoginModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/LDAPLoginModule.java?rev=592348&r1=592347&r2=592348&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/LDAPLoginModule.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/LDAPLoginModule.java
Tue Nov  6 01:35:17 2007
@@ -173,7 +173,7 @@
             // Clear out the private state
             cbUsername = null;
             cbPassword = null;
-            groups.retainAll(Collections.EMPTY_SET);
+            groups.clear();
             throw new FailedLoginException();
         }
 
@@ -186,13 +186,13 @@
             // Clear out the private state
             cbUsername = null;
             cbPassword = null;
-            groups.retainAll(Collections.EMPTY_SET);
+            groups.clear();
             throw e;
         } catch (Exception e) {
             // Clear out the private state
             cbUsername = null;
             cbPassword = null;
-            groups.retainAll(Collections.EMPTY_SET);
+            groups.clear();
             throw (LoginException) new LoginException("LDAP Error").initCause(e);
         }
 
@@ -219,7 +219,7 @@
         // Clear out the private state
         cbUsername = null;
         cbPassword = null;
-        groups.retainAll(Collections.EMPTY_SET);
+        groups.clear();
 
         return loginSucceeded;
     }
@@ -229,8 +229,8 @@
             // Clear out the private state
             cbUsername = null;
             cbPassword = null;
-            groups.retainAll(Collections.EMPTY_SET);
-            allPrincipals.retainAll(Collections.EMPTY_SET);
+            groups.clear();
+            allPrincipals.clear();
         }
         return loginSucceeded;
     }
@@ -240,12 +240,12 @@
         loginSucceeded = false;
         cbUsername = null;
         cbPassword = null;
-        groups.retainAll(Collections.EMPTY_SET);
+        groups.clear();
         if(!subject.isReadOnly()) {
             // Remove principals added by this LoginModule
             subject.getPrincipals().removeAll(allPrincipals);
         }
-        allPrincipals.retainAll(Collections.EMPTY_SET);
+        allPrincipals.clear();
         return true;
     }
 

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/PropertiesFileLoginModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/PropertiesFileLoginModule.java?rev=592348&r1=592347&r2=592348&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/PropertiesFileLoginModule.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/PropertiesFileLoginModule.java
Tue Nov  6 01:35:17 2007
@@ -243,7 +243,7 @@
             // Clear out the private state
             username = null;
             password = null;
-            allPrincipals.retainAll(Collections.EMPTY_SET);
+            allPrincipals.clear();
         }
         return loginSucceeded;
     }
@@ -257,7 +257,7 @@
             // Remove principals added by this LoginModule
             subject.getPrincipals().removeAll(allPrincipals);
         }
-        allPrincipals.retainAll(Collections.EMPTY_SET);
+        allPrincipals.clear();
         return true;
     }
 

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/SQLLoginModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/SQLLoginModule.java?rev=592348&r1=592347&r2=592348&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/SQLLoginModule.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/providers/SQLLoginModule.java
Tue Nov  6 01:35:17 2007
@@ -296,19 +296,19 @@
             // Clear out the private state
             cbUsername = null;
             cbPassword = null;
-            groups.retainAll(Collections.EMPTY_SET);
+            groups.clear();
             throw e;
         } catch (SQLException sqle) {
             // Clear out the private state
             cbUsername = null;
             cbPassword = null;
-            groups.retainAll(Collections.EMPTY_SET);
+            groups.clear();
             throw (LoginException) new LoginException("SQL error").initCause(sqle);
         } catch (Exception e) {
             // Clear out the private state
             cbUsername = null;
             cbPassword = null;
-            groups.retainAll(Collections.EMPTY_SET);
+            groups.clear();
             throw (LoginException) new LoginException("Could not access datasource").initCause(e);
         }
 
@@ -335,7 +335,7 @@
         // Clear out the private state
         cbUsername = null;
         cbPassword = null;
-        groups.retainAll(Collections.EMPTY_SET);
+        groups.clear();
 
         return loginSucceeded;
     }
@@ -345,8 +345,8 @@
             // Clear out the private state
             cbUsername = null;
             cbPassword = null;
-            groups.retainAll(Collections.EMPTY_SET);
-            allPrincipals.retainAll(Collections.EMPTY_SET);
+            groups.clear();
+            allPrincipals.clear();
         }
         return loginSucceeded;
     }
@@ -356,12 +356,12 @@
         loginSucceeded = false;
         cbUsername = null;
         cbPassword = null;
-        groups.retainAll(Collections.EMPTY_SET);
+        groups.clear();
         if(!subject.isReadOnly()) {
             // Remove principals added by this LoginModule
             subject.getPrincipals().removeAll(allPrincipals);
         }
-        allPrincipals.retainAll(Collections.EMPTY_SET);
+        allPrincipals.clear();
         return true;
     }
 



Mime
View raw message