jpountz commented on code in PR #11954:
URL: https://github.com/apache/lucene/pull/11954#discussion_r1029300137


##########
lucene/core/src/java/org/apache/lucene/index/ExitableDirectoryReader.java:
##########
@@ -784,7 +770,10 @@ protected DirectoryReader 
doWrapDirectoryReader(DirectoryReader in) throws IOExc
    */
   public static DirectoryReader wrap(DirectoryReader in, QueryTimeout 
queryTimeout)
       throws IOException {
-    return new ExitableDirectoryReader(in, queryTimeout);
+    if (queryTimeout != null) {

Review Comment:
   I would keep it simple and use `Objects#requireNonNull`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to