Yair Zaslavsky has posted comments on this change.

Change subject: [WIP] API: Adding Job mapper class
......................................................................


Patch Set 1: (1 inline comment)

....................................................
File 
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/JobMapper.java
Line 82:             to = org.ovirt.engine.api.model.Status.class)
Line 83:     public static org.ovirt.engine.api.model.Status 
map(org.ovirt.engine.core.common.job.JobExecutionStatus status,
Line 84:             org.ovirt.engine.api.model.Status incoming) {
Line 85:         Status st = new Status();
Line 86:         if (JobExecutionStatus.STARTED == status) {
Can we reduce this if... somehow?
what about this one liner: st.SetState(status != null ?  status.name() : 
JobExecutionStatus.UNKNOWN ) ?
Line 87:             st.setState(JobExecutionStatus.STARTED.name());
Line 88:             return st;
Line 89:         }
Line 90:         if (JobExecutionStatus.FINISHED == status) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id1b95a094dc586e6ebbdacd44e0a034e91602163
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to