mikemccand commented on a change in pull request #2052:
URL: https://github.com/apache/lucene-solr/pull/2052#discussion_r527777826



##########
File path: lucene/misc/native/src/main/posix/NativePosixUtil.cpp
##########
@@ -102,6 +102,7 @@ JNIEXPORT jint JNICALL 
Java_org_apache_lucene_misc_store_NativePosixUtil_posix_1
 }
 #endif
 
+// TODO: To be removed together?

Review comment:
       Awesome!
   
   Yeah, `// nocommit` comment is really helpful in patches/PRs to note 
something that you know you need to fix before pushing.  Plus, our build 
tooling will catch us if we accidentally push code with `// nocommit` still.

##########
File path: 
lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java
##########
@@ -745,7 +745,7 @@ public synchronized IndexInput openInput(String name, 
IOContext context) throws
       maybeThrowDeterministicException();
     }
     if (!LuceneTestCase.slowFileExists(in, name)) {
-      throw randomState.nextBoolean() ? new FileNotFoundException(name + " in 
dir=" + in) : new NoSuchFileException(name + " in dir=" + in);
+      throw new NoSuchFileException(name + " in dir=" + in);

Review comment:
       Hmm why did we remove the randomness about which (confusingly) different 
exception to throw here?  This randomness was (is?) useful to help test that 
Lucene indeed catches `FNFE` and `NSFE` interchangeably.

##########
File path: 
lucene/misc/src/java/org/apache/lucene/misc/store/DirectIODirectory.java
##########
@@ -72,14 +64,17 @@
  * and OS X; other Unixes should work but have not been
  * tested!  Use at your own risk.
  *
+ * <p>Throws UnsupportedOperationException if the operating system or

Review comment:
       Can we move this to `@throws` javadoc tag?




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

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