On Thu, May 23, 2013 at 7:12 PM, Emmanuel Lécharny <[email protected]>wrote:

> Hi Kiran,
>
> while looking at Sonar reports
> (https://analysis.apache.org/drilldown/violations), I found a weird
> piece of code, which is likely ot be an error in SyncReplRequestHandler :
>
>     private void sendContentFromLog( LdapSession session, SearchRequest
> req, ReplicaEventLog clientMsgLog,
>         String fromCsn )
>         throws Exception
>     {
>     ...
>                 switch ( event )
>                 {
>                     case ADD:
>                         syncStateType = SyncStateTypeEnum.ADD;
>                         break;
>
>                     case MODIFY:
>                         syncStateType = SyncStateTypeEnum.MODIFY;
>                         break;
>
>                     case MODDN:
>                         syncStateType = SyncStateTypeEnum.MODDN;
> <<<<--------------- No break, so the syncStateType will switch to DELETE
>
>                     case DELETE:
>                         syncStateType = SyncStateTypeEnum.DELETE;
>                         break;
>                 }
>
> Am I correct to think that we must add a break ?
>
> yes, this is clearly a big mistake (which I guess might have resulted from
a merge from keydap source)
thanks for finding

> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>


-- 
Kiran Ayyagari
http://keydap.com

Reply via email to