DaanHoogland commented on code in PR #6704:
URL: https://github.com/apache/cloudstack/pull/6704#discussion_r999054284


##########
server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java:
##########
@@ -1823,6 +1823,26 @@ private Volume 
changeDiskOfferingForVolumeInternal(VolumeVO volume, Long newDisk
         return volume;
     }
 
+    /**
+     * This method is to compare long values, in miniops and maxiops a or b 
can be null or 0.
+     * Use this method to treat 0 and null as same
+     *
+     * @param a
+     * @param b
+     * @return true if a and b are equal excluding 0 and null values.
+     */
+    private boolean compareEqualsIncludingNullOrZero(Long a, Long b) {
+        if ((a != null && a == 0 && b == null) || (a == null && b != null && b 
== 0)) {
+            return true;
+        }
+
+        if (a == b) {

Review Comment:
   ```suggestion
           if (a.equals(b)) {
   ```



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

Reply via email to