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

MYFACES-4247: reduce number of char[] objects and CommonPropertyUtils… #11

Merged
merged 1 commit into from Jul 16, 2018

Conversation

pnicolucci
Copy link
Contributor

… calls

@pnicolucci pnicolucci self-assigned this Jul 12, 2018
@pnicolucci
Copy link
Contributor Author

@tandraschko can you review these changes and let me know if you have any concerns? If not I'll merge this PR.

@tandraschko
Copy link
Member

+1 for the CommonProperties stuff

+0 for the changes in write
could you explain them before?

@pnicolucci
Copy link
Contributor Author

@tandraschko : String.toCharArray() is what is not called now
The string uses its internal char[] instead of a copy to put the chars in the this.buff object.
Otherwise you make a copy of the char[] with toCharArray() and then copy that char[] into this.buff

This removes one copy of the char[]

@tandraschko
Copy link
Member

if it works fine, i'm ok with it
it would be just better if we would have a unittest for it?

@pnicolucci
Copy link
Contributor Author

pnicolucci commented Jul 16, 2018

I'll add a couple unit tests and ensure the behavior is the same before and after the changes just to be extra safe.

@pnicolucci pnicolucci merged commit 1b71736 into apache:master Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants