Skip to content

Commit d61145d

Browse files
nikagraCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 0ce3bd0 commit d61145d

File tree

3 files changed

+2
-23
lines changed

3 files changed

+2
-23
lines changed

core/src/main/java/com/datastax/oss/driver/api/core/session/SessionBuilder.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -965,8 +965,7 @@ protected final CompletionStage<CqlSession> buildDefaultSessionAsync() {
965965
InetSocketAddress socketAddress =
966966
parseContactPoint(addr, endpoint.getConnectionId());
967967
programmaticContactPoints.add(new DefaultEndPoint(socketAddress));
968-
} catch (IllegalArgumentException e) {
969-
throw e;
968+
970969
} catch (Exception e) {
971970
throw new IllegalArgumentException(
972971
String.format(

core/src/test/java/com/datastax/oss/driver/api/core/session/ClientRoutesSessionBuilderTest.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,6 @@ public void should_allow_null_client_routes_config() {
5353
assertThat(builder.programmaticArgumentsBuilder.build().getClientRoutesConfig()).isNull();
5454
}
5555

56-
@Test
57-
public void should_validate_connection_address_format() {
58-
// Valid formats should be accepted (tested in integration/functional tests)
59-
// Here we test that invalid formats produce helpful error messages
60-
61-
UUID connectionId = UUID.randomUUID();
62-
63-
// Invalid port: not a number
64-
ClientRoutesConfig.builder()
65-
.addEndpoint(new ClientRoutesEndpoint(connectionId, "host:abc"))
66-
.build();
67-
68-
// Note: Actual validation happens in SessionBuilder.buildDefaultSessionAsync()
69-
// which is called during session.build(). Since we can't easily test that here
70-
// without creating a full session (which requires infrastructure), we document
71-
// the expected behavior:
72-
// - "host:abc" should throw IllegalArgumentException: "Invalid port number 'abc'..."
73-
// - "host:99999" should throw IllegalArgumentException: "Port must be between 1 and 65535"
74-
// These are tested in ClientRoutesValidationTest.
75-
}
7656

7757
/** Test subclass to access protected fields. */
7858
private static class TestSessionBuilder extends SessionBuilder<TestSessionBuilder, CqlSession> {

manual/core/address_resolution/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ The system table name can be customized in the [configuration](../configuration/
159159
datastax-java-driver.advanced.client-routes.table-name = "system.client_routes"
160160
```
161161

162-
**Note:** As of version 4.19.0.5, the client routes configuration API is available, but the full handler implementation
162+
**Note:** As of the current version, the client routes configuration API is available, but the full handler implementation
163163
(DNS resolution, address translation, event handling) is still under development.
164164

165165
### EC2 multi-region

0 commit comments

Comments
 (0)