Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
3.0.0
-
None
Description
It's a potential source of bugs for applications who write code like:
new ConnectionString(...).getCredentialList().add(...); |
thinking that a credential is added to the list. But ConnectionString is actually immutable, and getCredentialList returns a new ArrayList each time it's called, making that call a no-op.
The getCredentialList implementation should be updated to return an immutable list so that the above code results in a runtime exception, and the documentation should be updated to reflect that.
The ConnectionString class should also be annotated with @Immutable.
Attachments
Issue Links
- is related to
-
JAVA-2269 Unable to connect to cluster DB in AWS using Java Async driver
-
- Closed
-