Shireesh Anjal has posted comments on this change.

Change subject: restapi: Adding Enum validations in create volume (#831096)
......................................................................


Patch Set 2: (3 inline comments)

Few comments inline.

....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/gluster/BackendGlusterVolumesResource.java
Line 82:         if (volume.isSetVolumeType())
validateParameters would have made sure that volumeType is set. So this if 
condition is not required.

Line 89:             for (String transportType : 
volume.getTransportTypes().getTransportTypes())
How if you extract this inner for loop into a new method in the base class, say

public List<<E extends Enum<E>>> E validateEnums(Class<E> clz, List<String> 
names);

Line 101:         }
It will look cleaner and more readable if you extract all enum validations into 
a separate method, say validateEnumParameters() ?

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I06602c5bb4eec461a80ddaf3d96ac9eb0d3f6a56
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to