davisusanibar commented on code in PR #36042: URL: https://github.com/apache/arrow/pull/36042#discussion_r1245979042
########## java/memory/memory-core/src/test/java/org/apache/arrow/memory/TestArrowBuf.java: ########## @@ -165,14 +166,14 @@ public void testEnabledHistoricalLog() { modifiersDebug.setInt(fieldDebug, fieldDebug.getModifiers() & ~Modifier.FINAL); fieldDebug.set(null, true); try (BufferAllocator allocator = new RootAllocator(128)) { - ArrowBuf buf = allocator.buffer(2); - } catch (Exception e) { + allocator.buffer(2); + Exception e = assertThrows(IllegalStateException.class, () -> allocator.close()); assertTrue(e.getMessage().contains("event log for:")); // JDK8, JDK11 } finally { fieldDebug.set(null, false); } } catch (Exception e) { - assertTrue(e.toString().contains("java.lang.NoSuchFieldException: modifiers")); // JDK17+ + assertTrue(e.toString().equals("java.lang.NoSuchFieldException: modifiers")); // JDK17+ Review Comment: Ok, let me maintain contains instead. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org