[ 
https://issues.apache.org/jira/browse/MRM-1938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Stockhammer updated MRM-1938:
------------------------------------
    Fix Version/s: 3.0.0

> Condition that always returns true
> ----------------------------------
>
>                 Key: MRM-1938
>                 URL: https://issues.apache.org/jira/browse/MRM-1938
>             Project: Archiva
>          Issue Type: Bug
>            Reporter: JC
>            Assignee: Martin Stockhammer
>             Fix For: 3.0.0
>
>
> Hi
> In a recent snapshot mirrored from Github for archiva-redback-core, I've 
> found following suspicious code in 
> redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/user/LdapUserMapper.java.
> {code}
> 156         if ( !StringUtils.isEmpty( user.getFullName() ) )
> 157         {
> 158             if ( user.getFullName() == null )
> 159             {
> 160                 addAttrs.put( getUserFullNameAttribute(), 
> user.getFullName() );
> 161             }
> 162             else if ( !user.getFullName().equals( user.getFullName() ) )
> 163             {
> 164                 modAttrs.put( getUserFullNameAttribute(), 
> user.getFullName() );
> 165             }
> 166         }
> 167 
> 168         if ( !StringUtils.isEmpty( user.getEmail() ) )
> 169         {
> 170             if ( user.getEmail() == null )
> 171             {
> 172                 addAttrs.put( getEmailAddressAttribute(), user.getEmail() 
> );
> 173             }
> 174             else if ( !user.getEmail().equals( user.getEmail() ) )
> 175             {
> 176                 modAttrs.put( getEmailAddressAttribute(), user.getEmail() 
> );
> 177             }
> 178         }
> {code}
> In Line 162, and 174, the conditions should be 
> user.getFullName().equals( fullNameAttribute )
> user.getEmail().equals( emailAttribute )
> respectively?
> This might not be an issue, but wanted to report just in case. Thanks!



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to