fightBoxing opened a new pull request, #15893: URL: https://github.com/apache/iceberg/pull/15893
## Summary This PR improves code robustness across 7 core files, addressing 12 issues identified through static analysis. ## Changes ### HTTPClient - **Fix inconsistent config reading** in `configureConnectionManager()` — Changed `Integer.getInteger()` to `PropertyUtil.propertyAsInt()` for `REST_MAX_CONNECTIONS`, ensuring user-configured `rest.client.max-connections` takes effect. - **Preserve original exception** in `buildUri()` — Pass `URISyntaxException` to `RESTException` constructor for better debugging. ### BaseCommitService - **Fix race condition** on `succeededCommits` — Changed from plain `int` to `AtomicInteger` for thread-safe increment. ### SnapshotProducer - **Add logging** for swallowed `NumberFormatException` in `updateTotal()` — Previously silently ignored corrupted snapshot summary values. - **Re-throw `Error`** in `catch(Throwable)` blocks — Prevents masking OOM/StackOverflow errors during cleanup and notification. - **Add default branch** to `switch(entry.status())` — Throws `IllegalStateException` for unexpected `ManifestEntry.Status` values. ### BaseTaskWriter - **Change `abort()` cleanup strategy** — Use `suppressFailureWhenFinished()` instead of `throwFailureWhenFinished()` to ensure all files are attempted for deletion during abort. ### ErrorHandlers - **Handle HTTP 405/406 status codes** — Previously silently ignored. - **Include HTTP status code** in `RESTException` messages for better diagnostics. ### BaseTransaction - **Add default branch** to `switch(type)` for unknown `TransactionType`. ### Exceptions - **Add debug logging** for suppressed close exceptions. ## Verification - `compileJava` — BUILD SUCCESSFUL - `spotlessCheck` — BUILD SUCCESSFUL -- 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]
