tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <...@pidster.com>
Subject Re: [PATCH] Fix suspicious logic operator usage
Date Wed, 05 Oct 2011 12:06:20 GMT
File a bug, attach the patch to the bug etc...

p
On 5 October 2011 11:33, Francis Galiegue <fgaliegue@gmail.com> wrote:
> Found by FindBugs. startService() and stopService() both return boolean, so it
> is likely that the '&' is a typo and '&&' was meant.
> ---
>  .../tribes/membership/McastServiceImpl.java        |    2 +-
>  1 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
>                 while (!success) {
>                     if(log.isInfoEnabled())
>                         log.info("Tribes membership, running recovery thread,
multicasting is not functional.");
> -                    if (stopService() & startService()) {
> +                    if (stopService() && startService()) {
>                         success = true;
>                         if(log.isInfoEnabled())
>                             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
>
>



-- 
pidster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message