Michael Pasternak has posted comments on this change.
Change subject: restapi: #853739 - Actions Should Return Entities In Body
......................................................................
Patch Set 4: (3 inline comments)
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendResource.java
Line 163
Line 164
Line 165
Line 166
Line 167
why this change is needed? is there none calling performNonBlockingAction()
with action body?
Line 304: return null;
Line 305: }
Line 306:
Line 307: protected Object removeUnnecessaryInfo(Object entity) throws
InstantiationException, IllegalAccessException, NoSuchMethodException {
Line 308: String methodName;
white-space
Line 309: Object newEntity = entity.getClass().newInstance();
Line 310: for (Method m : newEntity.getClass().getMethods()) {
Line 311: methodName = m.getName();
Line 312: if (methodName.startsWith("set") &&
Line 306:
Line 307: protected Object removeUnnecessaryInfo(Object entity) throws
InstantiationException, IllegalAccessException, NoSuchMethodException {
Line 308: String methodName;
Line 309: Object newEntity = entity.getClass().newInstance();
Line 310: for (Method m : newEntity.getClass().getMethods()) {
did you saw my comment in the patch-set 2 on this?, just create object of same
type
and copy id/href without any reflection
Line 311: methodName = m.getName();
Line 312: if (methodName.startsWith("set") &&
Line 313: (methodName.equals("setId") ||
Line 314: methodName.equals("setHref"))) {
--
To view, visit http://gerrit.ovirt.org/9466
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic636b7205fa7b6fbb5d98efdbcd7976e9beb2187
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ori Liel <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ori Liel <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches