Skip to content

Commit 9b7e688

Browse files
committed
Don't use a static QueryShardResult for a null instance (#52063)
Fixes #52042
1 parent 343fb36 commit 9b7e688

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

server/src/main/java/org/elasticsearch/search/query/QuerySearchResult.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,11 @@ private QuerySearchResult(boolean isNull) {
9292
this.isNull = isNull;
9393
}
9494

95-
private static final QuerySearchResult nullInstance = new QuerySearchResult(true);
96-
9795
/**
9896
* Returns an instance that contains no response.
9997
*/
10098
public static QuerySearchResult nullInstance() {
101-
return nullInstance;
99+
return new QuerySearchResult(true);
102100
}
103101

104102
/**

0 commit comments

Comments
 (0)