Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 50348 invoked from network); 24 Jun 2006 07:47:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Jun 2006 07:47:30 -0000 Received: (qmail 74014 invoked by uid 500); 24 Jun 2006 07:47:30 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 73972 invoked by uid 500); 24 Jun 2006 07:47:30 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 73961 invoked by uid 99); 24 Jun 2006 07:47:29 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Jun 2006 00:47:29 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Jun 2006 00:47:29 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id E4C8B1A983E; Sat, 24 Jun 2006 00:47:08 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@directory.apache.org From: ersiner@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060624074708.E4C8B1A983E@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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; } }