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 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); going back to map is log n to something that you have at your disposal... Line 63: } Line 64: Line 65: /** Line 66: * Used by Json deserializer to retrieve the existing VdcParameter Line 77: } Line 78: Line 79: private static String getValue(String token) { Line 80: String[] split = token.split("="); Line 81: return split[1]; no... I mean that you must parse the keyword, as you need to make sure you are using the correct value... and not relay on positional at all... for x in split(';') y=split('=') map.put(y[0], y[1]) guid = map.get("guid") Line 82: } .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/VdcParametersMap.java Line 76: * Used by Json serializer. Return a copy of the parameters map so other Line 77: * parts of the code don't get access to the internal data structure Line 78: */ Line 79: public Map<VdcParameter, Object> getParamsMap() { Line 80: return (Map<VdcParameter, Object>) ((HashMap)paramsMap).clone(); ok, isn't there in java any map wrapper which is read only? Line 81: } Line 82: Line 83: /** Line 84: * Used by Json deserializer. Copy the contents of the map by calling -- 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