Re: svn commit: r406888 - /directory/trunks/apacheds/kerberos-shared/src/main/java/org
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Directory Project > Re: svn commit: r406888 - /directory/trunks/apacheds/kerberos-shared/src/main/java/org




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

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


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-16-06 12:11 PM

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






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:40 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register