From commits-return-69971-archive-asf-public=cust-asf.ponee.io@cloudstack.apache.org Fri Jan 5 13:47:44 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 93B37180647 for ; Fri, 5 Jan 2018 13:47:44 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 83874160C3B; Fri, 5 Jan 2018 12:47:44 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F0A77160C27 for ; Fri, 5 Jan 2018 13:47:43 +0100 (CET) Received: (qmail 80380 invoked by uid 500); 5 Jan 2018 12:47:43 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 80362 invoked by uid 99); 5 Jan 2018 12:47:43 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jan 2018 12:47:43 +0000 From: GitBox To: commits@cloudstack.apache.org Subject: [GitHub] rafaelweingartner commented on a change in pull request #2315: A comprehensive solution for CLOUDSTACK-9025 and CLOUDSTACK-10128. Message-ID: <151515646249.25193.12873519615572907864.gitbox@gitbox.apache.org> rafaelweingartner commented on a change in pull request #2315: A comprehensive solution for CLOUDSTACK-9025 and CLOUDSTACK-10128. URL: https://github.com/apache/cloudstack/pull/2315#discussion_r159868750 ########## File path: plugins/hypervisors/xenserver/src/com/cloud/hypervisor/XenServerGuru.java ########## @@ -167,35 +170,62 @@ public boolean trackVmHostChange() { @Override public Pair getCommandHostDelegation(long hostId, Command cmd) { Review comment: Actually, it depends on how you count. Normally you would need to build a decision graph to calculate. However, the most import thing in my opinion is the removal of 3/4 conditionals one inside the other. And More specifically this block: ``` if (hypervisorVersion != null && !hypervisorVersion.equalsIgnoreCase("6.1.0")) { - if (!(hypervisorVersion.equalsIgnoreCase("6.2.0") && - !(snapshotHotFixVersion != null && snapshotHotFixVersion.equalsIgnoreCase(XenserverConfigs.XSHotFix62ESP1004)))) { - return new Pair(Boolean.TRUE, new Long(host.getId())); - } - } ```` Those negations altogether do not compute well in my mind... ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services