Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RedisURI: improve deprecation notice in withPassword() #1707

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/main/java/io/lettuce/core/RedisURI.java
Original file line number Diff line number Diff line change
Expand Up @@ -1518,9 +1518,14 @@ public Builder withAuthentication(String username, char[] password) {
/**
* Configures authentication.
*
* This method is deprecated as of Lettuce 6.0. The reason is that {@link String} has a
* strong caching affinity and the JVM cannot easily GC {@code String} instances. Therefore
* we suggest using either {@code char[]} or a custom {@link CharSequence} (e.g. {@link
* StringBuilder} or netty's {@link io.netty.util.AsciiString}).
*
* @param password the password
* @return the builder
* @deprecated since 6.0. Use {@link #withPassword(CharSequence)} or {@link #withPassword(char[])} avoid String caching.
* @deprecated since 6.0. Use {@link #withPassword(CharSequence)} or {@link #withPassword(char[])} to avoid String caching.
*/
@Deprecated
public Builder withPassword(String password) {
Expand Down