jbonofre commented on code in PR #1363:
URL: https://github.com/apache/arrow-java/pull/1363#discussion_r4296760234
##########
flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/client/ArrowFlightSqlClientHandler.java:
##########
@@ -1065,6 +1101,9 @@ public ArrowFlightSqlClientHandler build() throws
SQLException {
buildTimeMiddlewareFactories.forEach(clientBuilder::intercept);
if (useEncryption) {
clientBuilder.useTls();
+ if (hostnameOverride != null) {
Review Comment:
`hostnameOverride` is only checked for `!= null`, so an empty value (e.g.
`...&hostnameOverride=` from a templated URL) calls `overrideAuthority("")`.
That fails with an invalid-authority error instead of falling back to the
connection host.
Could we treat empty or blank as unset?
```suggestion
if (hostnameOverride != null &&
!hostnameOverride.trim().isEmpty()) {
```
--
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]