Skip to content

Commit

Permalink
Address review comment
Browse files Browse the repository at this point in the history
Signed-off-by: Suraj Singh <[email protected]>
  • Loading branch information
dreamer-89 committed Mar 17, 2022
1 parent 1c66ee2 commit d61b06a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,16 @@ protected PercolateQueryBuilder(String field, Supplier<BytesReference> documentS
name = in.readOptionalString();
if (in.getVersion().before(Version.V_2_0_0)) {
String documentType = in.readOptionalString();
assert documentType == null;
if (documentType != null) {
throw new IllegalStateException("documentType must be null");
}
}
indexedDocumentIndex = in.readOptionalString();
if (in.getVersion().before(Version.V_2_0_0)) {
String indexedDocumentType = in.readOptionalString();
assert indexedDocumentType == null;
if (indexedDocumentType != null) {
throw new IllegalStateException("indexedDocumentType must be null");
}
}

indexedDocumentId = in.readOptionalString();
Expand Down

0 comments on commit d61b06a

Please sign in to comment.