Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-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 8DD819D78 for ; Wed, 5 Oct 2011 12:06:50 +0000 (UTC) Received: (qmail 84757 invoked by uid 500); 5 Oct 2011 12:06:49 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 84698 invoked by uid 500); 5 Oct 2011 12:06:49 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 84689 invoked by uid 99); 5 Oct 2011 12:06:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2011 12:06:49 +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 (athena.apache.org: domain of pid@pidster.com designates 209.85.212.45 as permitted sender) Received: from [209.85.212.45] (HELO mail-vw0-f45.google.com) (209.85.212.45) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2011 12:06:43 +0000 Received: by vws17 with SMTP id 17so1826733vws.18 for ; Wed, 05 Oct 2011 05:06:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pidster.com; s=google; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=VmRhjUsZnnczZjsf40wRBmcnBs0PB0xNwZJwHnFNbQ4=; b=OHEc7XF7WPkicusxq6hJ93fCWgUD9jRG/fwtaVfbXppAcQpf2H6IadOrF+pmMxOVvO B8pU15+e9jCbvWE89rDmjOa+Sd8BKLSRi7xynw5u1AYPLwFAiElqrigaGQltJvdmvUUi kiNCHiKABO5wskNXfb5/E0hKdgamIgPz5+GGo= MIME-Version: 1.0 Received: by 10.52.23.2 with SMTP id i2mr2370580vdf.412.1317816380642; Wed, 05 Oct 2011 05:06:20 -0700 (PDT) Received: by 10.52.163.106 with HTTP; Wed, 5 Oct 2011 05:06:20 -0700 (PDT) X-Originating-IP: [217.114.168.10] In-Reply-To: <1317810834-8929-1-git-send-email-fgaliegue@gmail.com> References: <1317810834-8929-1-git-send-email-fgaliegue@gmail.com> Date: Wed, 5 Oct 2011 13:06:20 +0100 Message-ID: Subject: Re: [PATCH] Fix suspicious logic operator usage From: Pid To: Tomcat Developers List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable File a bug, attach the patch to the bug etc... p On 5 October 2011 11:33, Francis Galiegue wrote: > Found by FindBugs. startService() and stopService() both return boolean, = so it > is likely that the '&' is a typo and '&&' was meant. > --- > =C2=A0.../tribes/membership/McastServiceImpl.java =C2=A0 =C2=A0 =C2=A0 = =C2=A0| =C2=A0 =C2=A02 +- > =C2=A01 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/java/org/apache/catalina/tribes/membership/McastServiceImpl.= java b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java > index 8569ed4..5e59700 100644 > --- a/java/org/apache/catalina/tribes/membership/McastServiceImpl.java > +++ b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java > @@ -631,7 +631,7 @@ public class McastServiceImpl > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 while (!success) = { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if(= log.isInfoEnabled()) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 log.info("Tribes membership, running recovery thread, multicasti= ng is not functional."); > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if= (stopService() & startService()) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if= (stopService() && startService()) { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 success =3D true; > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 if(log.isInfoEnabled()) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 log.info("Membership recovery was successful."); > -- > 1.7.6.1 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > For additional commands, e-mail: dev-help@tomcat.apache.org > > --=20 pidster.com --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org