spring-projects/spring-framework — pull request #683 by overmindx (2014-10-28 14:59:18+00:00)
Title: CharacterEditor.setAsText() and setAsUnicode(), Using valueOf is faster than using constructor

The java.lang.Character.valueOf(char c) returns a Character instance representing the specified char value. If a new Character instance is not required, this method should generally be used in preference to the constructor Character(char), as this method is likely to yield significantly better space and time performance by caching frequently requested values.

This method will always cache values in the range '\u0000' to '\u007F', inclusive, and may cache other values outside of this range.

So I changed source like this

setValue(new Character(text.charAt(0)));
-> setValue(Character.valueOf(text.charAt(0)));

setValue(new Character((char)code));
-> setValue(Character.valueOf((char) code));