Sergey Gotliv has posted comments on this change.

Change subject: engine : Fix for coverity issues introduced in SizeConverter
......................................................................


Patch Set 8: Code-Review-1

(2 comments)

....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/SizeConverter.java
Line 61:                         Double.valueOf(SizeConverter.convert(size, 
inUnit, currentUnitPair.getSecond()).doubleValue()));
Line 62:             }
Line 63:         }
Line 64:         return new Pair<SizeConverter.SizeUnit, 
Double>(SizeUnit.BYTES, Double.valueOf(size));
Line 65:     }
Why not casting to double?
Line 66: 
Line 67:     private static class CompareUnits implements Comparator<Pair<Long, 
SizeUnit>> , Serializable{
Line 68: 
Line 69:         private static final long serialVersionUID = 
-659222322712056953L;


Line 66: 
Line 67:     private static class CompareUnits implements Comparator<Pair<Long, 
SizeUnit>> , Serializable{
Line 68: 
Line 69:         private static final long serialVersionUID = 
-659222322712056953L;
Line 70: 
Why you don't use inline comparator, why we need this class?
Line 71:         @Override
Line 72:         public int compare(Pair<Long, SizeUnit> unit1, Pair<Long, 
SizeUnit> unit2) {
Line 73:             return unit1.getFirst().compareTo(unit2.getFirst());
Line 74:         }


-- 
To view, visit http://gerrit.ovirt.org/21919
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I570e4e69ea6229346c1d20e8f917994c6875eb49
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: anmolbabu <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: anmolbabu <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to