Skip to content

[Flight] Reject port 0 in NettyClientBuilder #1271

Closed

Description

@ennuite

Port 0 is reserved and invalid for client TCP connections, but NettyClientBuilder.build() currently allows it through (it rejects only negative ports and values above 65535). The lower bound should be tightened to 1.

Four builder-based tests in the JDBC module also have a latent bug where .withPort() is never called, so the port field defaults to 0. These fail once the lower bound is tightened:

  • ConnectionTest.testGetBasicClientNoAuthShouldOpenConnection
  • ConnectionTlsTest.testGetNonAuthenticatedEncryptedClientNoAuth
  • ConnectionTlsRootCertsTest.testGetNonAuthenticatedEncryptedClientNoAuth
  • ConnectionMutualTlsTest.testGetNonAuthenticatedEncryptedClientNoAuth

Each needs .withPort(FLIGHT_SERVER_TEST_EXTENSION.getPort()) added to its builder call.

This was deferred from #1027 to keep that PR small — see #1027 (comment).

Activity

  1. changed the title [-]Reject port 0 in NettyClientBuilder and fix tests that omit port[/-] [+][Flight] Reject port 0 in NettyClientBuilder[/+] on Aug 31, 2026
  2. ennuite commented on Aug 31, 2026

    @ennuite
    ContributorAuthor

    take

  3. ennuite commented on Aug 31, 2026

    @ennuite
    ContributorAuthor

    I have a PR prepared for this one, I'll open it once #1027 is merged because the work here has a dependency on the work there.

  4. ennuite commented on Aug 31, 2026

    @ennuite
    ContributorAuthor

    This is an enhancement, I can't add the label.

  5. added this to the 20.0.0 milestone on Sep 1, 2026
  6. added a commit that references this issue on Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions