Skip to content

io.lettuce.core.RedisURI.Builder#withPassword(java.lang.String) deprecation #1695

Answered by mp911de
perlun asked this question in Q&A
Discussion options

You must be logged in to vote

The reason is that String has a strong caching affinity and the JVM cannot be easily GC String instances. Therefore we suggest either using char[] or a custom CharSequence (StringBuilder, netty's AsciiString). Deprecating this method should raise awareness and indicate that there are better options for password handling than String.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@perlun
Comment options

@mp911de
Comment options

@perlun
Comment options

@haicoder
Comment options

@perlun
Comment options

Answer selected by perlun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants