You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Hongchao Deng (JIRA)" <ji...@apache.org> on 2014/07/21 18:50:39 UTC
[jira] [Updated] (ZOOKEEPER-1981) Fix Dodgy Code Warnings
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1981?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hongchao Deng updated ZOOKEEPER-1981:
-------------------------------------
Summary: Fix Dodgy Code Warnings (was: Fix Dodgy code Warnings)
> Fix Dodgy Code Warnings
> -----------------------
>
> 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
>
>
> 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)