activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r550451 - in /activemq/trunk/activemq-jaas/src: main/java/org/apache/activemq/jaas/ test/java/org/apache/activemq/jaas/
Date Mon, 25 Jun 2007 10:57:58 GMT
Author: rajdavies
Date: Mon Jun 25 03:57:57 2007
New Revision: 550451

URL: http://svn.apache.org/viewvc?view=rev&rev=550451
Log:
apply patch http://issues.apache.org/activemq/browse/AMQ-1293

Modified:
    activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java
    activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/PropertiesLoginModule.java
    activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/TextFileCertificateLoginModule.java
    activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/CertificateLoginModuleTest.java

Modified: activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java?view=diff&rev=550451&r1=550450&r2=550451
==============================================================================
--- activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java
(original)
+++ activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java
Mon Jun 25 03:57:57 2007
@@ -119,8 +119,8 @@
         userRoleName = (String) options.get(USER_ROLE_NAME);
         userSearchMatchingFormat = new MessageFormat(userSearchMatching);
         roleSearchMatchingFormat = new MessageFormat(roleSearchMatching);
-        userSearchSubtreeBool = new Boolean(userSearchSubtree).booleanValue();
-        roleSearchSubtreeBool = new Boolean(roleSearchSubtree).booleanValue();
+        userSearchSubtreeBool = Boolean.valueOf(userSearchSubtree).booleanValue();
+        roleSearchSubtreeBool = Boolean.valueOf(roleSearchSubtree).booleanValue();
     }
 
     public boolean login() throws LoginException {

Modified: activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/PropertiesLoginModule.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/PropertiesLoginModule.java?view=diff&rev=550451&r1=550450&r2=550451
==============================================================================
--- activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/PropertiesLoginModule.java
(original)
+++ activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/PropertiesLoginModule.java
Mon Jun 25 03:57:57 2007
@@ -44,8 +44,8 @@
  */
 public class PropertiesLoginModule implements LoginModule {
 
-    private final String USER_FILE = "org.apache.activemq.jaas.properties.user";
-    private final String GROUP_FILE = "org.apache.activemq.jaas.properties.group";
+    private static final String USER_FILE = "org.apache.activemq.jaas.properties.user";
+    private static final String GROUP_FILE = "org.apache.activemq.jaas.properties.group";
 
     private static final Log log = LogFactory.getLog(PropertiesLoginModule.class);
 
@@ -83,13 +83,17 @@
     public boolean login() throws LoginException {
         File f = new File(baseDir,usersFile);
         try {
-            users.load(new java.io.FileInputStream(f));
+        	java.io.FileInputStream in = new java.io.FileInputStream(f);
+            users.load(in);
+            in.close();
         } catch (IOException ioe) {
             throw new LoginException("Unable to load user properties file " + f);
         }
         f = new File(baseDir, groupsFile);
         try {
-            groups.load(new java.io.FileInputStream(f));
+        	java.io.FileInputStream in = new java.io.FileInputStream(f);
+            groups.load(in);
+            in.close();
         } catch (IOException ioe) {
             throw new LoginException("Unable to load group properties file " + f);
         }

Modified: activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/TextFileCertificateLoginModule.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/TextFileCertificateLoginModule.java?view=diff&rev=550451&r1=550450&r2=550451
==============================================================================
--- activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/TextFileCertificateLoginModule.java
(original)
+++ activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/TextFileCertificateLoginModule.java
Mon Jun 25 03:57:57 2007
@@ -47,8 +47,8 @@
  */
 public class TextFileCertificateLoginModule extends CertificateLoginModule {
     
-    private final String USER_FILE = "org.apache.activemq.jaas.textfiledn.user";
-    private final String GROUP_FILE = "org.apache.activemq.jaas.textfiledn.group";
+    private static final String USER_FILE = "org.apache.activemq.jaas.textfiledn.user";
+    private static final String GROUP_FILE = "org.apache.activemq.jaas.textfiledn.group";
     
     private File baseDir;
     private String usersFilePathname;
@@ -88,7 +88,9 @@
         Properties users = new Properties();
         
         try {
-            users.load(new java.io.FileInputStream(usersFile));
+        	java.io.FileInputStream in = new java.io.FileInputStream(usersFile);
+            users.load(in);
+            in.close();
         } catch (IOException ioe) {
             throw new LoginException("Unable to load user properties file " + usersFile);
         }
@@ -119,7 +121,9 @@
         
         Properties groups = new Properties();
         try {
-            groups.load(new java.io.FileInputStream(groupsFile));
+        	java.io.FileInputStream in = new java.io.FileInputStream(groupsFile);
+            groups.load(in);
+            in.close();
         } catch (IOException ioe) {
             throw new LoginException("Unable to load group properties file " + groupsFile);
         }

Modified: activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/CertificateLoginModuleTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/CertificateLoginModuleTest.java?view=diff&rev=550451&r1=550450&r2=550451
==============================================================================
--- activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/CertificateLoginModuleTest.java
(original)
+++ activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/CertificateLoginModuleTest.java
Mon Jun 25 03:57:57 2007
@@ -35,8 +35,8 @@
 import javax.security.auth.login.LoginException;
 
 public class CertificateLoginModuleTest extends TestCase {
-    private final String userName = "testUser";
-    private final List groupNames = new Vector();
+    private static final String userName = "testUser";
+    private static final List groupNames = new Vector();
     private StubCertificateLoginModule loginModule;
     
     private Subject subject;



Mime
View raw message