lidavidm commented on code in PR #13200:
URL: https://github.com/apache/arrow/pull/13200#discussion_r878294468
##########
java/dataset/src/main/java/org/apache/arrow/dataset/jni/DirectReservationListener.java:
##########
@@ -87,11 +87,40 @@ public void unreserve(long size) {
public long getCurrentDirectMemReservation() {
try {
final Class<?> classBits = Class.forName("java.nio.Bits");
- final Field f = classBits.getDeclaredField("reservedMemory");
+ final Field f;
+ Field fBaseOnJDKVersion;
Review Comment:
Nit but I would just use `f` and make it non-final here no need to
complicate it with extra assignments
--
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]