jbonofre opened a new pull request, #1501: URL: https://github.com/apache/arrow-java/pull/1501
## What's Changed Follow-up to #1496 (#1499). - Treat blank `trustStore` and `tlsRootCerts` values as unset (`null`) in `ArrowFlightConnectionConfigImpl` and `ArrowFlightSqlClientHandler.Builder` (consistent with `hostnameOverride`), so empty query parameters or blank optional properties (e.g., `?trustStore=&useSystemTrustStore=true` or `?tlsRootCerts=&trustStore=...`) do not shadow fallback trust sources or fail trying to open an empty path. - Validate `trustStorePassword != null` in `ArrowFlightSqlClientHandler.Builder#build()` before calling `ClientAuthenticationUtils.getCertificateStream(...)`, so configuring `trustStore` without `trustStorePassword` throws `SQLException` (wrapping `IllegalArgumentException`) and closes the connection allocator instead of leaking an uncaught `NullPointerException`. - Sync Javadoc on `ArrowFlightSqlClientHandler.Builder#withSystemTrustStore`, `#withTrustStorePath`, and `#withTlsRootCertificates`, and clarify precedence and blank-value handling in `docs/source/flight_sql_jdbc_driver.rst`. - Tighten `ConnectionTlsTest#testGetAuthenticatedEncryptedConnectionWithKeyStoreBadPassword` to assert the `IOException` -> `UnrecoverableKeyException` cause chain, and add unit/connection tests for blank `trustStore`/`tlsRootCerts` and missing `trustStorePassword`. ## Tests - Ran `ConnectionTlsTest`, `ConnectionTlsRootCertsTest`, `ConnectionTlsHostnameOverrideTest`, `ConnectionMutualTlsTest`, `ArrowFlightSqlClientHandlerBuilderTest`, and `ArrowFlightConnectionConfigImplTest` on JDK 17, 21, and 25, plus `spotless:check` and `checkstyle:check`. Closes #1500. -- 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]
