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

Ammend more consistent naming using CharSequence instead of String #1073

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ralfs-gutmanis
Copy link

Background
As part of security requirements - to avoid leaving traces of very sensitive data in memory, we are trying to clear memory as much as it is possible. All instance of java.lang.String are immutable and stay in memory until Garbage Collector deletes them.

Solution
Avoid needlessly calling .toString() if the value already is a CharSequence

Add condition to avoid needlessly creating String object in format if the value already is instanceof CharSequence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants