sureshanaparti commented on a change in pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#discussion_r713741670
##########
File path:
vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java
##########
@@ -839,10 +849,79 @@ private static void createPortGroup(String
physicalNetwork, String networkName,
}
}
- public static boolean isSpecMatch(DVPortgroupConfigInfo
currentDvPortgroupInfo, DVPortgroupConfigSpec newDvPortGroupSpec) {
+ private static boolean eitherObjectNull(Object obj1, Object obj2) {
+ return (obj1 == null && obj2 != null) || (obj1 != null && obj2 ==
null);
+ }
+
+ private static boolean areBoolPoliciesDifferent(BoolPolicy currentPolicy,
BoolPolicy newPolicy) {
+ return eitherObjectNull(currentPolicy, newPolicy) ||
+ (newPolicy != null && newPolicy.isValue() !=
currentPolicy.isValue());
Review comment:
@shwstppr why not you handle case 3) in the private method itself?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]