uschindler commented on PR #11917:
URL: https://github.com/apache/lucene/pull/11917#issuecomment-1313914337

   Looks fine. I would add 3 predefined constants:
   
   ```java
   public static final BiPredicate<String,Context> ALL_FILES = (file, context) 
-> true;
   public static final BiPredicate<String,Context> NO_FILES = (file, context) 
-> false;
   public static final BiPredicate<String,Context> USE_LOAD_CONTEXT = (file, 
context) -> context.load;
   ```
   
   Then you could also keep the deprecated getter by compaing with ALL_FILES; 
The Default would be the new one.
   
   What's missing is a little bit of better documentation in `setPreload()` and 
possibly the class javadocs. It is unknown what the first param "String" of the 
predicate is, it should document that it is the filename.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to