thswlsqls opened a new pull request, #16886: URL: https://github.com/apache/iceberg/pull/16886
<!-- No issue: minor bug fix, issue not required --> ## Summary - `EcsURI(String location)` passed the boolean `location == null` to `Preconditions.checkNotNull`, whose first argument is the reference to null-check — so the autoboxed `Boolean` was always non-null and the guard never fired. - When `location` was null the check passed and `URI.create(location)` threw a `NullPointerException` with no message. - Fix: pass `location` itself so the intended null check runs and yields the "Location ... can not be null" message. - The sibling `S3URI` constructor in the AWS module already validates its location up front: https://github.com/apache/iceberg/blob/main/aws/src/main/java/org/apache/iceberg/aws/s3/S3URI.java ## Testing done - Added `TestEcsURI#testNullLocation` covering a null location input. - Verified the regression: before the fix this test fails (the unguarded NPE from `URI.create(null)` has no "can not be null" message); after the fix it passes. - `./gradlew :iceberg-dell:check` — passed, TestEcsURI runs 4 tests (test + spotlessCheck + checkstyle + errorProne). -- 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]
