)]}' { "commit": "74a3945b982e96232d9ea82c7cb5239935183d56", "tree": "a56c3b7638ac2cf346378f4e0fc36284e3f81c8b", "parents": [ "1983ac7a8cf43416c76de26bdffde97ae8a7ef34" ], "author": { "name": "Edwin Kempin", "email": "ekempin@google.com", "time": "Tue Jan 17 08:34:14 2023 +0100" }, "committer": { "name": "Edwin Kempin", "email": "ekempin@google.com", "time": "Tue Jan 17 08:11:24 2023 +0000" }, "message": "Reland \"Fix error when using the message operator with regex on ...\"\n\nThis relands change I99e2b8a3d that was reverted by change I4e551ac53.\n\nThe problem with the original change was that it no longer used the\ncheckFieldAvailable method to throw the QueryParseException. This method\nis overridden in SubmitRequirementChangeQueryBuilder to suppress field\nchecks for operators that are used in submit requirement expressions.\nSince submit requirement expressions are evaluated in memory the version\nof the index and the available fields do not matter for them.\n\nFix this by changing the checkFieldAvailable method so that it supports\nan arbitrary error message. This way we can also use it to throw the\nQueryParseException with the improved error message. Checking for an\nunsupported operator is done by the checkOperatorAvailable method now\nthat delegates to the checkFieldAvailable method. This way all\nQueryParseExceptions are thrown from the checkFieldAvailable method and\noverriding it in SubmitRequirementChangeQueryBuilder to suppress the\nexceptions for submit requirement expressions works in all cases.\n\nChange-Id: I6c73ecadfa0bfaaa70aaf7c2050fc1df555760f7\nBug: Google b/264478714\nRelease-Notes: skip\n", "tree_diff": [ { "type": "modify", "old_id": "510ca011df0538cd4750d4dd39167762c1433072", "old_mode": 33188, "old_path": "java/com/google/gerrit/server/query/change/ChangeQueryBuilder.java", "new_id": "355ad6354b49fa8541ab6390f63faa8aa0e35c37", "new_mode": 33188, "new_path": "java/com/google/gerrit/server/query/change/ChangeQueryBuilder.java" } ] }