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

Hudson commented on ZOOKEEPER-1247:
-----------------------------------

Integrated in ZooKeeper-trunk #1347 (See 
[https://builds.apache.org/job/ZooKeeper-trunk/1347/])
    ZOOKEEPER-1247. dead code in PrepRequestProcessor.pRequest multi case 
(Thomas Koch via phunt)

phunt : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1190073
Files : 
* /zookeeper/trunk/CHANGES.txt
* 
/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java

                
> dead code in PrepRequestProcessor.pRequest multi case
> -----------------------------------------------------
>
>                 Key: ZOOKEEPER-1247
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1247
>             Project: ZooKeeper
>          Issue Type: Sub-task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1247.patch
>
>
> There's an if statement in the for loop which sets the request.hdr.type and 
> request.txn in case that an error happened in the preceding multiop. However 
> hdr and txn are overwritten anyways at the end of the multi case. The values 
> set are only used a bit later to serialize them. This could better be 
> achieved with local variables holding the temporary hdr and txn.
> Also the if condition (ke == null) in the catch block is pointless, since the 
> surrounding if(ke != null) makes sure that the catch block could only ever be 
> reached in a loop where ke == null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to