Skip to content

Commit dc80adc

Browse files
ennuiteclaude
andcommitted
GH-1027: Allow port 0 through NettyClientBuilder validation
Port 0 is used in several existing tests as a placeholder. It does not cause the async-hang issue this validation was introduced to prevent (that affects truly out-of-range values). Tightening the lower bound to 1 and fixing those tests is left for a follow-up PR. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2cc7a10 commit dc80adc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

flight/flight-core/src/main/java/org/apache/arrow/flight/grpc/NettyClientBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ public NettyChannelBuilder build() {
140140
case LocationSchemes.GRPC_TLS:
141141
{
142142
final int port = location.getUri().getPort();
143-
if (port < 1 || port > 65535) {
143+
if (port < 0 || port > 65535) {
144144
throw new IllegalArgumentException(
145-
"Invalid port " + port + ": must be between 1 and 65535.");
145+
"Invalid port " + port + ": must be between 0 and 65535.");
146146
}
147147
builder = NettyChannelBuilder.forAddress(location.getUri().getHost(), port);
148148
break;

0 commit comments

Comments
 (0)