Apache Directory Project - Re: svn commit: r406888 - /directory/trunks/apacheds/kerberos-shared/src/main/java/org

This is Interesting: Free IT Magazines  
Home > Archive > Apache Directory Project > May 2006 > Re: svn commit: r406888 - /directory/trunks/apacheds/kerberos-shared/src/main/java/org





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: svn commit: r406888 - /directory/trunks/apacheds/kerberos-shared/src/main/java/org
Emmanuel Lecharny

2006-05-16, 7:11 am

Thanks ersin !

btw, could you replace
if ( bool.equals( "true" ) )

by
if ( "true".equalsIgnorecase( bool ) )

?


On 5/16/06, ersiner-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org <ersiner-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org> wrote:
> Author: ersiner
> Date: Tue May 16 02:58:43 2006
> New Revision: 406888
>
> URL: http://svn.apache.org/viewcvs?rev=3D406888&view=3Drev
> Log:
> Removed 1.5 dep by replacing Boolean.parseBoolean with custom implementat=

ion.
> It's better to move this simple method to a common place though.
>
> Modified:
> directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/di=

rectory/server/kerberos/shared/store/operations/GetPrincipal.java
>
> Modified: directory/trunks/apacheds/kerberos-shared/src/main/java/org/apa=

che/directory/server/kerberos/shared/store/operations/GetPrincipal.java
> URL: http://svn.apache.org/viewcvs/direc...s/kerberos-sha=

red/src/main/java/org/apache/directory/server/kerberos/shared/store/operati=
ons/GetPrincipal.java?rev=3D406888&r1=3D406887&r2=3D406888&view=3Ddiff
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/di=

rectory/server/kerberos/shared/store/operations/GetPrincipal.java (original=
)
> +++ directory/trunks/apacheds/kerberos-shared/src/main/java/org/apache/di=

rectory/server/kerberos/shared/store/operations/GetPrincipal.java Tue May 1=
6 02:58:43 2006
> @@ -126,13 +126,13 @@
> if ( attrs.get( KerberosAttribute.ACCOUNT_DISABLED ) !=3D null )
> {
> String val =3D ( String ) attrs.get( KerberosAttribute.ACCOU=

NT_DISABLED ).get();
> - modifier.setDisabled( Boolean.parseBoolean( val.toLowerCase(=

) ) );
> + modifier.setDisabled( parseBoolean( val.toLowerCase() ) );
> }
>
> if ( attrs.get( KerberosAttribute.ACCOUNT_LOCKEDOUT ) !=3D null =

)
> {
> String val =3D ( String ) attrs.get( KerberosAttribute.ACCOU=

NT_LOCKEDOUT ).get();
> - modifier.setLockedOut( Boolean.parseBoolean( val.toLowerCase=

() ) );
> + modifier.setLockedOut( parseBoolean( val.toLowerCase() ) );
> }
>
> if ( attrs.get( KerberosAttribute.ACCOUNT_EXPIRATION_TIME ) !=3D=

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;
> + }
> +
> }
>
>
>



--=20
Cordialement,
Emmanuel L=E9charny

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com