nastra commented on code in PR #7868:
URL: https://github.com/apache/iceberg/pull/7868#discussion_r1236463414


##########
core/src/test/java/org/apache/iceberg/TestManifestReaderStats.java:
##########
@@ -275,9 +275,6 @@ private void assertStatsDropped(DataFile dataFile) {
 
   private void assertNullRecordCount(DataFile dataFile) {
     // record count is a primitive type, accessing null record count will 
throw NPE
-    AssertHelpers.assertThrows(
-        "Should throw NPE when accessing non-populated record count field",
-        NullPointerException.class,
-        dataFile::recordCount);
+    
Assertions.assertThatThrownBy(dataFile::recordCount).isInstanceOf(NullPointerException.class);

Review Comment:
   it seems that newer JDK versions actually provide an informative error msg 
to indicate where the NPE happened. In this case let's omit the `.hasMessage()` 
part



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to