djencks     2004/07/25 01:14:42

  Modified:    
modules/security/src/java/org/apache/geronimo/security/realm/providers
                        PropertiesFileLoginModule.java
                        PropertiesFileSecurityRealm.java
  Log:
  minor safety improvements
  
  Revision  Changes    Path
  1.6       +3 -1      
incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/realm/providers/PropertiesFileLoginModule.java
  
  Index: PropertiesFileLoginModule.java
  ===================================================================
  RCS file: 
/home/cvs/incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/realm/providers/PropertiesFileLoginModule.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PropertiesFileLoginModule.java    22 Jun 2004 02:07:37 -0000      1.5
  +++ PropertiesFileLoginModule.java    25 Jul 2004 08:14:42 -0000      1.6
  @@ -44,6 +44,7 @@
   
       public void initialize(Subject subject, CallbackHandler callbackHandler, 
Map sharedState, Map options) {
           realm = (PropertiesFileSecurityRealm) 
options.get(PropertiesFileSecurityRealm.REALM_INSTANCE);
  +        assert realm != null;
   
           this.subject = subject;
           this.handler = callbackHandler;
  @@ -62,6 +63,7 @@
               throw (LoginException) new LoginException().initCause(uce);
           }
           username = ((NameCallback) callbacks[0]).getName();
  +        assert username != null;
           password = realm.users.getProperty(username);
   
           return new String(((PasswordCallback) 
callbacks[1]).getPassword()).equals(password);
  
  
  
  1.10      +3 -3      
incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/realm/providers/PropertiesFileSecurityRealm.java
  
  Index: PropertiesFileSecurityRealm.java
  ===================================================================
  RCS file: 
/home/cvs/incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/realm/providers/PropertiesFileSecurityRealm.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- PropertiesFileSecurityRealm.java  12 Jul 2004 06:07:51 -0000      1.9
  +++ PropertiesFileSecurityRealm.java  25 Jul 2004 08:14:42 -0000      1.10
  @@ -47,8 +47,8 @@
       private boolean running = false;
       private URI usersURI;
       private URI groupsURI;
  -    Properties users = new Properties();
  -    Properties groups = new Properties();
  +    final Properties users = new Properties();
  +    final Properties groups = new Properties();
   
       final static String REALM_INSTANCE = 
"org.apache.geronimo.security.realm.providers.PropertiesFileSecurityRealm";
   
  
  
  

Reply via email to