[ https://issues.apache.org/jira/browse/SYNAPSE-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15688679#comment-15688679 ]
Hudson commented on SYNAPSE-1061: --------------------------------- SUCCESS: Integrated in Jenkins build Synapse - Trunk #5286 (See [https://builds.apache.org/job/Synapse%20-%20Trunk/5286/]) applying patch by vanji to fix SYNAPSE-1061 (isudana: rev 1770905) * (edit) java/modules/core/src/main/java/org/apache/synapse/endpoints/algorithms/WeightedRRLCAlgorithm.java > WeightedRRLCAlgorithm Unwanted condition > ----------------------------------------- > > Key: SYNAPSE-1061 > URL: https://issues.apache.org/jira/browse/SYNAPSE-1061 > Project: Synapse > Issue Type: Bug > Reporter: Vanjikumaran Sivajothy > Assignee: Isuru Udana Loku Narangoda > Fix For: 3.0 > > Attachments: SYNAPSE-1061.diff > > > was going through with WeightedRRLCAlgorithm and noticed that useless > condition used in reCalcuateWeight(). Why do we need that condition over > there and it is already known that totalConnections is not a zero. > {code} > public void reCalcuateWeight() { > if (totalConnections > 0) { > double weightRatio = (double) fixedWeight / totalWeight; > double connectionRatio; > if (totalConnections != 0) { //useless condition...?? > connectionRatio = (double) currentConnectionCount / > totalConnections; > } else { > connectionRatio = 0; > } > double diff = weightRatio - connectionRatio; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@synapse.apache.org For additional commands, e-mail: dev-h...@synapse.apache.org