Ori Liel has posted comments on this change.
Change subject: restapi: Update Tag Makes Redundant Call
......................................................................
Patch Set 2: (1 inline comment)
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendTagResource.java
Line 42: String existingTagParentId =
Line 43: existingTag.isSetParent() &&
existingTag.getParent().isSetTag() &&
existingTag.getParent().getTag().isSetId() ? existingTag.getParent()
Line 44: .getTag()
Line 45: .getId() : null;
Line 46: if (isSetParent(incoming) &&
!incoming.getParent().getTag().getId().equals(existingTagParentId)) {
.equals(null) does not throw NPE, it returns false.
Besides this is string matching, must use equals(), can't use ==
Line 47: moveTag(asGuid(incoming.getParent().getTag().getId()));
Line 48: }
Line 49:
Line 50: return performUpdate(incoming,
--
To view, visit http://gerrit.ovirt.org/7818
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I01ddc4f951b43a66cc44152df7ff67fb4f87f6b1
Gerrit-PatchSet: 2
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]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches