Roy Golan has posted comments on this change.
Change subject: core: SyntaxChecker cleanup
......................................................................
Patch Set 1: (2 inline comments)
minor comment
....................................................
File
backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/SyntaxChecker.java
Line 149: if (curConditionFieldAC == null) {
Line 150:
container.setErr(SyntaxError.CANT_GET_CONDITION_FIELD_AC, startPos.argvalue,
idx);
Line 151: return ValueParseResult.Err;
Line 152: }
Line 153: if ((!"".equals(curConditionField))
could you also remove those extra brackets?
Line 154: &&
(!curConditionFieldAC.validateFieldValue(curConditionField, strRealObj))) {
Line 155: container.setErr(SyntaxError.INVALID_CONDITION_VALUE,
startPos.argvalue, idx);
Line 156: return ValueParseResult.Err;
Line 157: }
Line 256: }
Line 257: if (mDotAC.validate(nextObject)) {
Line 258:
syntaxContainer.addSyntaxObject(SyntaxObjectType.DOT, nextObject, curStartPos,
idx + 1);
Line 259: curStartPos = idx + 1;
Line 260: } else if ((!"".equals(tryNextObj)) &&
(curConditionRelationAC.validate(tryNextObj))) {
same here.
Line 261: break; // i.e. the relation object has another
charecter
Line 262: } else if
(curConditionRelationAC.validate(nextObject)) {
Line 263:
syntaxContainer.addSyntaxObject(SyntaxObjectType.CONDITION_RELATION,
nextObject, curStartPos, idx + 1);
Line 264: curStartPos = idx + 1;
--
To view, visit http://gerrit.ovirt.org/8217
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5f395a3a99780a73e056239b805e127ef931935
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sharad Mishra <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches