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

Thomas Koch commented on ZOOKEEPER-1255:
----------------------------------------

I've created classes representing Transactions and ReadRequests containing 
methods to process these transactions. Thus the FinalRequestProcessor and the 
DataTree already became a lot shorter and the ProcessTxnResult looks totally 
different (and moved into the Transaction class):

https://github.com/thkoch2001/zookeeper/blob/proposed_patches/src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java
https://github.com/thkoch2001/zookeeper/blob/proposed_patches/src/java/main/org/apache/zookeeper/server/ReadRequest.java
https://github.com/thkoch2001/zookeeper/blob/proposed_patches/src/java/main/org/apache/zookeeper/server/Transaction.java

The branch above already builds on top of OpCode enum and Path class. Just 
ignore this. Do you thing something like this might end up in ZK?
                
> unused fields in DataTree.ProcessTxnResult
> ------------------------------------------
>
>                 Key: ZOOKEEPER-1255
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1255
>             Project: ZooKeeper
>          Issue Type: Sub-task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>            Priority: Minor
>         Attachments: ZOOKEEPER-1255.patch
>
>
> The fields zxid, cxid and clientId in ProcessTxnResult are never used. cxid 
> and clientId are used in equals() and hashCode() but the class is never ever 
> used as a key or compared.
> Keeping equals() and hashCode() "just in case" is a bad idea:
> http://www.infoq.com/news/2011/05/less-code-is-better

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