Skip to content

Ammend more consistent naming using CharSequence instead of String#1073

Open
ralfs-gutmanis wants to merge 1 commit intojknack:masterfrom
ralfs-gutmanis:master
Open

Ammend more consistent naming using CharSequence instead of String#1073
ralfs-gutmanis wants to merge 1 commit intojknack:masterfrom
ralfs-gutmanis:master

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