Alon Bar-Lev has posted comments on this change.
Change subject: engine: Add infrastructure code for removal of parameter classes
......................................................................
Patch Set 16:
(3 comments)
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/InvalidParameterRequestTypeException.java
Line 1: package org.ovirt.engine.core.common.utils;
Line 2:
Line 3: public class InvalidParameterRequestTypeException extends
ClassCastException {
Line 4:
Line 5: public InvalidParameterRequestTypeException(String expected, String
actual) {
please keep class usage even if you have limitation of implementation at one
specific point.
Line 6: super("Invalid return type requested for
VdcQueryParametersBase.getParameter. Expected value of type "
Line 7: + expected
Line 8: + " but requested class was "
Line 9: + actual);
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/VdcParametersMap.java
Line 18: paramsMap = new HashMap<VdcParameter, Serializable>();
Line 19: }
Line 20:
Line 21: public VdcParametersMap put(VdcParameter param, Object value) {
Line 22: paramsMap.put(param, (Serializable) value);
I am not sure I follow, you claim that gwt cannot determine instance type?
Line 23: return this;
Line 24: }
Line 25:
Line 26: public <T> T get(VdcParameter param) {
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/VdcParametersMeta.java
Line 8: public class VdcParametersMeta implements Serializable{
Line 9:
Line 10: private static final Map<UUID, VdcParameter> parametersMap = new
HashMap<UUID, VdcParameter>();
Line 11:
Line 12: protected static VdcParameter create(String name, Class javaType,
String uuidStr) {
I prefer to keep create in VdcParameter, and just delegate these method from
here.
The use of the VdcParametersMeta is optional, just for the developer who like
easier integration with IDE, no?
Line 13: UUID uuid = UUID.fromString(uuidStr);
Line 14: synchronized (parametersMap) {
Line 15: VdcParameter param = parametersMap.get(uuid);
Line 16: if (param != null) {
--
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: 16
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Liran Zelkha <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: mooli tayer <[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