Skip to content

GH-1039: [Flight] Fix ClassCastException when building FlightClient with domain socket location - #1121

Merged
lidavidm merged 3 commits into
apache:mainfrom
ennuite:uds-bug
Aug 25, 2026
Merged

GH-1039: [Flight] Fix ClassCastException when building FlightClient with domain socket location#1121
lidavidm merged 3 commits into
apache:mainfrom
ennuite:uds-bug

Conversation

@ennuite

@ennuite ennuite commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

What's Changed

Fix a ClassCastException onFlightClient.builder().build() when connecting via a Unix domain socket on Linux (epoll) or macOS (kqueue), by casting to the Netty interface Channel instead of the server-specific ServerChannel.

Also adds netty-transport-native-epoll (Linux) and netty-transport-native-kqueue (macOS) as test-scoped dependencies in flight-core via OS-activated profiles, so the existing TestServerOptions#domainSocket test actually runs instead of being skipped everywhere.

This change was created with AI assistance (Claude Code). All lines were manually reviewed by a human. The output is not copyrightable subject matter.

Closes #1039.

@github-actions

This comment has been minimized.

@ennuite
ennuite marked this pull request as ready for review April 20, 2026 03:00
@jbonofre

Copy link
Copy Markdown
Member

@ennuite I fixed the CI issue on main. Can you please rebase?

@ennuite

ennuite commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

@ennuite I fixed the CI issue on main. Can you please rebase?

Done. I followed the guidelines to rebase using git pull upstream main --rebase. Is this is your preferred way for rebases as a reviewer?

I personally don't like that it pollutes the "Files Change" tab with changes unrelated to the PR.

@lidavidm

Copy link
Copy Markdown
Member

Is that what you did? That should not produce a PR like this. A rebase should end up with only your commit in the PR.

@ennuite

ennuite commented May 12, 2026

Copy link
Copy Markdown
Contributor Author

Fixed. Can I get the bug-fix label?

@lidavidm lidavidm added the bug-fix PRs that fix a big. label May 13, 2026
@github-actions github-actions Bot added this to the 20.0.0 milestone May 13, 2026
@lidavidm

Copy link
Copy Markdown
Member

@ennuite please rebase

@lidavidm
lidavidm merged commit 180e4ec into apache:main Aug 25, 2026
34 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PRs that fix a big.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Java][Flight] ClassCastException in FlightClient when using Epoll Domain Socket: EpollDomainSocketChannel incorrectly cast to ServerChannel

3 participants