Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DFB5DD016 for ; Thu, 23 May 2013 13:42:39 +0000 (UTC) Received: (qmail 36344 invoked by uid 500); 23 May 2013 13:42:38 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 36132 invoked by uid 500); 23 May 2013 13:42:37 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 36102 invoked by uid 99); 23 May 2013 13:42:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 May 2013 13:42:36 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of elecharny@gmail.com designates 209.85.215.175 as permitted sender) Received: from [209.85.215.175] (HELO mail-ea0-f175.google.com) (209.85.215.175) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 May 2013 13:42:30 +0000 Received: by mail-ea0-f175.google.com with SMTP id h10so1860164eaj.20 for ; Thu, 23 May 2013 06:42:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type:content-transfer-encoding; bh=BN2C2QeHzdrfQnzqzmq5ZUlEYgX1c91dZ8XnKmP9btU=; b=mYdbcLffvUatsy0IGgybFtZI4cGCwAL/+TLZUxCOiWMmkDgHiamdnboVi7B3Ve/jC2 1GSberNZkFdnjLGX+kNw2AehUY/1g0vSeJAQ4ITDoHlQbTntX7WDrQItoA6tBHqWviI5 dWSG0BK5s1IW83t63szvD0CBi+0lQ5M7lVzg7OuIwqjyeKGDQasT3lzc6tWlO3Q9dRGT moD9NJOTET6lKuiM7yejw0qrWM4v3jftBdRlzm+QUYuNQOgospFEtYp8hIR+yPbDm6KK diaU+kRdGKOdwQLNcivVPBskkK1m/DoRth49bD9Mse7pgKAZB7W9B9+hn/U4BNNMB0dg YkmA== X-Received: by 10.14.111.5 with SMTP id v5mr31658521eeg.27.1369316530272; Thu, 23 May 2013 06:42:10 -0700 (PDT) Received: from Emmanuels-MacBook-Pro.local (lon92-10-78-226-4-211.fbx.proxad.net. [78.226.4.211]) by mx.google.com with ESMTPSA id l6sm16948583eef.12.2013.05.23.06.42.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 May 2013 06:42:09 -0700 (PDT) Message-ID: <519E1CB0.3080507@gmail.com> Date: Thu, 23 May 2013 15:42:08 +0200 From: =?UTF-8?B?RW1tYW51ZWwgTMOpY2hhcm55?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Apache Directory Developers List Subject: Suspicius code in SyncReplRequestHandler X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org 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 ? -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com