Juan Hernandez has posted comments on this change.
Change subject: restapi: Return Additional Info For 400 Messages (#867794)
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
Just a minor comment inside, feel free to merge with our without it.
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/validation/UsageFinder.java
Line 69:
Line 70: private boolean isMatchPath(String[] linkPathSegments,
List<PathSegment> uriPathSegments) {
Line 71: for (int i = 0; i < linkPathSegments.length; i++) {
Line 72: String uriPathSegment = uriPathSegments.get(i).getPath();
Line 73: if (isUUID(uriPathSegment) ||
uriPathSegment.equals(linkPathSegments[i])) {
Maybe invert the condition and return false:
if (!isUUID(uriPathSegment) && !uriPathSegment.equals(linkPathSegments[i])) {
return false;
}
That way you don't need the else branch.
Line 74: continue;
Line 75: } else {
Line 76: return false;
Line 77: }
--
To view, visit http://gerrit.ovirt.org/23017
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic7a6da4fbb00ea5f1e6919ddfe21dd7b3dd126fd
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ori Liel <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ori Liel <[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