Alon Bar-Lev has posted comments on this change. Change subject: engine: Add infrastructure code for removal of parameter classes ......................................................................
Patch Set 10: (3 comments) .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/VdcParameter.java Line 48: Line 49: @Override Line 50: public String toString() { Line 51: return "version=" + VERSION + ";guid="+ guid.toString(); Line 52: } question: are we forced to use the toString() as serialization? if not, I prefer two methods: serialize() and deserialize(s) instead of asymmetric toString() and deserialize() Line 53: Line 54: public static VdcParameter create(String name, Class javaType, String guidStr) { Line 55: Guid guid = new Guid(guidStr); Line 56: synchronized (parametersMap) { Line 58: throw new InvalidParameterGuidException(name, parametersMap.get(guid)); Line 59: } Line 60: parametersMap.put(guid, new VdcParameter(name, javaType, guid)); Line 61: } Line 62: return parametersMap.get(guid); I never understand where gerrit puts on patches... so repeat... why don't you keep the new VdcParameter() in a variable and return it instead of going via the map again? Line 63: } Line 64: Line 65: /** Line 66: * Used by Json deserializer to retrieve the existing VdcParameter Line 75: } Line 76: return null; Line 77: } Line 78: Line 79: private static String getValue(String token) { this can be solved above using tokens[x].split("=")[1] no? but where do you read the keyword? Line 80: String[] split = token.split("="); Line 81: return split[1]; Line 82: } -- To view, visit http://gerrit.ovirt.org/20414 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6a0970e492c0eff561888a46b02e47645ff68fc3 Gerrit-PatchSet: 10 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ravi Nori <rn...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com> Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com> Gerrit-Reviewer: Ravi Nori <rn...@redhat.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: mooli tayer <mta...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches