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

Hudson commented on ZOOKEEPER-1226:
-----------------------------------

Integrated in ZooKeeper-trunk #1336 (See 
[https://builds.apache.org/job/ZooKeeper-trunk/1336/])
    ZOOKEEPER-1226. extract version check in separate method in 
PrepRequestProcessor (Thomas Koch via camille)

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

                
> extract version check in separate method in PrepRequestProcessor
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1226
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1226
>             Project: ZooKeeper
>          Issue Type: Sub-task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>         Attachments: ZOOKEEPER-1226.patch
>
>
> The following code is repeated 4 times and should be put in a method that 
> either throws the Exception or returns the incremented version (see below).
> {code}
> version = setDataRequest.getVersion();
> int currentVersion = nodeRecord.stat.getVersion();
> if (version != -1 && version != currentVersion) {
>     throw new KeeperException.BadVersionException(path);
> }
> version = currentVersion + 1;
> {code}
> {code}
> private static int checkAndIncVersion(int currentVersion, int 
> versionToCompare, String path )
> {code}

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