stefanvodita commented on code in PR #13017:
URL: https://github.com/apache/lucene/pull/13017#discussion_r1485104633


##########
lucene/core/src/test/org/apache/lucene/index/TestIndexWriterMergePolicy.java:
##########
@@ -950,4 +957,354 @@ public void setMergeInfo(SegmentCommitInfo info) {
     w.close();
     dir.close();
   }
+
+  private static final class MockAssertFileExistIndexInput extends IndexInput {
+    private final String name;
+    private final IndexInput delegate;
+    private final Path filePath;
+
+    public MockAssertFileExistIndexInput(String name, IndexInput delegate, 
Path filePath) {
+      super("MockAssertFileExistIndexInput(name=" + name + " delegate=" + 
delegate + ")");
+      this.name = name;
+      this.delegate = delegate;
+      this.filePath = filePath;
+    }
+
+    private void checkFileExist() throws IOException {
+      if (!Files.exists(filePath)) {

Review Comment:
   Nit: We try not to use `!` in the Lucene codebase because it's easy to miss. 
We can say `Files.exists(filePath) == false` instead.



-- 
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