Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 7414 invoked from network); 16 May 2006 09:59:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 May 2006 09:59:06 -0000 Received: (qmail 32658 invoked by uid 500); 16 May 2006 09:59:06 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 32622 invoked by uid 500); 16 May 2006 09:59:05 -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 32609 invoked by uid 99); 16 May 2006 09:59:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 May 2006 02:59:05 -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: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 16 May 2006 02:59:05 -0700 Received: (qmail 7319 invoked by uid 65534); 16 May 2006 09:58:44 -0000 Message-ID: <20060516095844.7316.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r406888 - /directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java Date: Tue, 16 May 2006 09:58:44 -0000 To: commits@directory.apache.org From: ersiner@apache.org X-Mailer: svnmailer-1.0.8 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: ersiner Date: Tue May 16 02:58:43 2006 New Revision: 406888 URL: http://svn.apache.org/viewcvs?rev=406888&view=rev Log: Removed 1.5 dep by replacing Boolean.parseBoolean with custom implementation. It's better to move this simple method to a common place though. Modified: 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/GetPrincipal.java URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetPrincipal.java?rev=406888&r1=406887&r2=406888&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 Tue May 16 02:58:43 2006 @@ -126,13 +126,13 @@ if ( attrs.get( KerberosAttribute.ACCOUNT_DISABLED ) != null ) { String val = ( String ) attrs.get( KerberosAttribute.ACCOUNT_DISABLED ).get(); - modifier.setDisabled( Boolean.parseBoolean( val.toLowerCase() ) ); + modifier.setDisabled( parseBoolean( val.toLowerCase() ) ); } if ( attrs.get( KerberosAttribute.ACCOUNT_LOCKEDOUT ) != null ) { String val = ( String ) attrs.get( KerberosAttribute.ACCOUNT_LOCKEDOUT ).get(); - modifier.setLockedOut( Boolean.parseBoolean( val.toLowerCase() ) ); + modifier.setLockedOut( parseBoolean( val.toLowerCase() ) ); } if ( attrs.get( KerberosAttribute.ACCOUNT_EXPIRATION_TIME ) != null ) @@ -173,4 +173,18 @@ 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 ( bool.equals( "true" ) ) + { + return true; + } + + return false; + } + }