You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2014/07/22 13:32:38 UTC

[jira] [Commented] (ZOOKEEPER-1981) Fix Dodgy Code Warnings identified by findbugs 2.0.3

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14070143#comment-14070143 ] 

Hudson commented on ZOOKEEPER-1981:
-----------------------------------

FAILURE: Integrated in ZooKeeper-trunk #2382 (See [https://builds.apache.org/job/ZooKeeper-trunk/2382/])
ZOOKEEPER-1981. Fix Dodgy Code Warnings identified by findbugs 2.0.3 (Hongchao Deng via phunt) (phunt: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1612458)
* /zookeeper/trunk/CHANGES.txt
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeper.java
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/AuthFastLeaderElection.java
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/Follower.java


> Fix Dodgy Code Warnings identified by findbugs 2.0.3
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-1981
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1981
>             Project: ZooKeeper
>          Issue Type: Sub-task
>            Reporter: Hongchao Deng
>            Assignee: Hongchao Deng
>            Priority: Minor
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1981.patch
>
>
> There are two cases:
> 1. a duplicate check of null bytes.
> 2. a lot switch statement without default case.
> For the default case, I suggest 
> 1. throwing an exception as a way to break the program. It's highly unexpected. 
> 2. or LOG.warn it.
> I am doing the second right now to keep the original.



--
This message was sent by Atlassian JIRA
(v6.2#6252)