guiyanakuang commented on a change in pull request #961:
URL: https://github.com/apache/orc/pull/961#discussion_r747178525



##########
File path: java/core/src/java/org/apache/orc/OrcFile.java
##########
@@ -242,7 +242,7 @@ public static WriterVersion from(WriterImplementation 
writer, int val) {
             val + " for writer " + writer);
       }
       WriterVersion[] versions = values[writer.id];
-      if (val < 0 || versions.length < val) {
+      if (val < 0 || val >= versions.length) {

Review comment:
       I adjusted the order on purpose, comparing variables on the same side 
looks better to understand, that's how I feel.
   Of course I don't mind changing it back, but I'd like to hear your opinion.




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


Reply via email to