directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ersin Er <ersin...@gmail.com>
Subject Re: 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 11:48:05 GMT
Emmanuel Lecharny wrote:
> Thanks ersin !
>
> btw, could you replace
> if ( bool.equals( "true" ) )
>
> by
> if ( "true".equalsIgnorecase( bool ) )
>
> ?
I had added it just as a quick fix for the compilation problem. I would 
like to use shared/ldap/utils/BooleanUtils instead of the hack but 
shared-ldap is not yet a dependeny for kerberos-shared.

Anyways I've recommitted.

Cheers,

-- 
Ersin
>
> On 5/16/06, ersiner@apache.org <ersiner@apache.org> wrote:
>> 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;
>> +    }
>> +
>>  }
>>
>>
>>
>
>


Mime
View raw message