Skip to content

Commit cc71501

Browse files
committed
Fix exception message in ClusterSettings
Previously, an exception message about srvHost incorrectly referred to the hosts list. It's now update to refer to srvHost. JAVA-4141
1 parent cb3a874 commit cc71501

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver-core/src/main/com/mongodb/connection/ClusterSettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ private ClusterSettings(final Builder builder) {
544544

545545
if (builder.srvHost.split("\\.").length < 3) {
546546
throw new IllegalArgumentException(format("An SRV host name '%s' was provided that does not contain at least three parts. "
547-
+ "It must contain a hostname, domain name and a top level domain.", builder.hosts.get(0).getHost()));
547+
+ "It must contain a hostname, domain name and a top level domain.", builder.srvHost));
548548
}
549549
}
550550

0 commit comments

Comments
 (0)