rmuir commented on a change in pull request #348:
URL: https://github.com/apache/lucene/pull/348#discussion_r720801428



##########
File path: 
lucene/core/src/java/org/apache/lucene/codecs/MultiLevelSkipListReader.java
##########
@@ -319,6 +320,27 @@ public void readBytes(byte[] b, int offset, int len) {
       pos += len;
     }
 
+    @Override
+    public short readShort() throws IOException {
+      short value = (short) BitUtil.VH_LE_SHORT.get(pos);
+      pos += Short.BYTES;
+      return value;
+    }
+
+    @Override
+    public int readInt() throws IOException {
+      int value = (int) BitUtil.VH_LE_INT.get(pos);
+      pos += Integer.BYTES;
+      return value;
+    }
+
+    @Override
+    public long readLong() throws IOException {

Review comment:
       I don't want to make this code complicated over this issue. I think it 
is crazy to even attempt at a "rule" here. Due to the way it is encoded, 
methods such as readVInt() can't even adhere to it anyway.
   
   If there are insufficient bytes, you have index corruption. we don't need to 
guarantee a damn thing. let's keep code simple.




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