directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ersi...@apache.org
Subject svn commit: r416884 - in /directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations: GetAllPrincipals.java GetPrincipal.java
Date Sat, 24 Jun 2006 07:47:08 GMT
Author: ersiner
Date: Sat Jun 24 00:47:08 2006
New Revision: 416884

URL: http://svn.apache.org/viewvc?rev=416884&view=rev
Log:
Little fixes while reading the code.

Modified:
    directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java
    directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java

Modified: directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java?rev=416884&r1=416883&r2=416884&view=diff
==============================================================================
--- directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java
(original)
+++ directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java
Sat Jun 24 00:47:08 2006
@@ -47,12 +47,11 @@
 {
     private static final long serialVersionUID = -1214321426487445132L;
 
+    private static final String filter = "(objectClass=krb5Principal)";
 
     public Object execute( DirContext ctx, Name searchBaseDn )
     {
         SearchControls controls = new SearchControls();
-
-        String filter = "(objectClass=krb5Principal)";
 
         List answers = new ArrayList();
 

Modified: directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java?rev=416884&r1=416883&r2=416884&view=diff
==============================================================================
--- directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java
(original)
+++ directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java
Sat Jun 24 00:47:08 2006
@@ -126,13 +126,13 @@
         if ( attrs.get( KerberosAttribute.ACCOUNT_DISABLED ) != null )
         {
             String val = ( String ) attrs.get( KerberosAttribute.ACCOUNT_DISABLED ).get();

-            modifier.setDisabled( parseBoolean( val.toLowerCase() ) );
+            modifier.setDisabled( "true".equalsIgnoreCase( val ) );
         }
 
         if ( attrs.get( KerberosAttribute.ACCOUNT_LOCKEDOUT ) != null )
         {
             String val = ( String ) attrs.get( KerberosAttribute.ACCOUNT_LOCKEDOUT ).get();

-            modifier.setLockedOut( parseBoolean( val.toLowerCase() ) );
+            modifier.setLockedOut( "true".equalsIgnoreCase( val ) );
         }
         
         if ( attrs.get( KerberosAttribute.ACCOUNT_EXPIRATION_TIME ) != null )
@@ -172,19 +172,6 @@
         modifier.setEncryptionType( Integer.parseInt( encryptionType ) );
         modifier.setKeyVersionNumber( Integer.parseInt( keyVersionNumber ) );
         return modifier.getEntry();
-    }
-    
-    /**
-     * TODO: It's better to move this method to a common place.
-     */
-    private static boolean parseBoolean( String bool )
-    {
-        if ( "true".equalsIgnoreCase( bool ) )
-        {
-            return true;
-        }
-
-        return false;
     }
     
 }



Mime
View raw message