Improvement of CharacterEditor.setAsText() and setAsUnicode() [SPR-12386] #16994
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Kang Baek-Kyu opened SPR-12386 and commented
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));
Affects: 4.1.1
Reference URL: #683
Referenced from: commits 1e9ab53
The text was updated successfully, but these errors were encountered: