mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-09 06:25:07 +00:00
Don't use a static QueryShardResult for a null instance (#52063)
Fixes #52042
This commit is contained in:
parent
343fb36c7f
commit
9b7e688f5b
@ -92,13 +92,11 @@ public final class QuerySearchResult extends SearchPhaseResult {
|
|||||||
this.isNull = isNull;
|
this.isNull = isNull;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final QuerySearchResult nullInstance = new QuerySearchResult(true);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an instance that contains no response.
|
* Returns an instance that contains no response.
|
||||||
*/
|
*/
|
||||||
public static QuerySearchResult nullInstance() {
|
public static QuerySearchResult nullInstance() {
|
||||||
return nullInstance;
|
return new QuerySearchResult(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user