dweiss commented on code in PR #15093:
URL: https://github.com/apache/lucene/pull/15093#discussion_r2287242984


##########
lucene/core/src/java/org/apache/lucene/util/GroupVIntUtil.java:
##########
@@ -33,6 +39,46 @@ public final class GroupVIntUtil {
   private static final long[] LONG_MASKS = new long[] {0xFFL, 0xFFFFL, 
0xFFFFFFL, 0xFFFFFFFFL};
   private static final int[] INT_MASKS = new int[] {0xFF, 0xFFFF, 0xFFFFFF, 
~0};
 
+  /**
+   * A {@link VarHandle} which allows to read ints from a {@link ByteBuffer} 
using {@code long}
+   * offsets. The handle can be used with the {@code readGroupVInt()} methods 
taking a {@code
+   * VarHandle} and {@code ByteBuffer} storage parameter.
+   *
+   * @see #readGroupVInt(DataInput, long, VarHandle, Object, long, int[], int)
+   * @see #readGroupVInt(DataInput, long, VarHandle, Object, long, long[], int)
+   */
+  public static final VarHandle VH_BUFFER_GET_INT = getBufferVarHandle();
+
+  /**
+   * In Java 21 the {@code MethodHandles#filterArguments(...)} method is 
preview only, so we invoke
+   * it reflective. For this code it does not make sense to move the whole 
code to the Java 21

Review Comment:
   ```suggestion
      * it reflectively. For this code it does not make sense to move the whole 
code to the Java 21
   ```



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