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

Patrick Hunt commented on ZOOKEEPER-1981:
-----------------------------------------

Agree with Hongchao - we typically don't do that (include class/method in 
message) because the formatter will do that. You (deployer) can decide how to 
configure your log4j.properties.

> 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
>
>         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)

Reply via email to