Character, Byte, Short valueOf instead of new instance (original) (raw)

Chris Hegarty chris.hegarty at oracle.com
Thu Jun 26 15:07:52 UTC 2014


Otavio,

I scanner the patches and they mainly look fine to me. Just a minor issue, as per the Long thread.

diff -r d02b062bc827 src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java --- a/src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java Fri Jun 13 11:21:30 2014 -0700 +++ b/src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java Sat Jun 14 13:33:29 2014 -0300 @@ -379,7 +379,7 @@ // used for substring comparisons (where proto has "" wildcards private boolean substringMatch(String proto, String value) { // simple case 1: "" means attribute presence is being tested

-Chris.

On 14 Jun 2014, at 17:38, Otávio Gonçalves de Santana <otaviojava at java.net> wrote:

Reason: The Character, Byte, Short classes have cache and using it, will save memory and will faster than using create new instance.

webrev: https://dl.dropboxusercontent.com/u/16109193/openjdk/byteshortcharactervalueof.zip similar: https://bugs.openjdk.java.net/browse/JDK-8044461 -- Atenciosamente. Otávio Gonçalves de Santana blog: http://otaviosantana.blogspot.com.br/ twitter: http://twitter.com/otaviojava site: http://www.otaviojava.com.br (11) 98255-3513 <suntools.diff><sunsecurity.diff><sunmisc.diff><sunmanagement.diff><jdkinternal.diff><javaxmanagement.diff><javabeans.diff><javaawt.diff><comsunsecurity.diff><comsunjndi.diff><comsunjmx.diff><comsun.diff>



More information about the core-libs-dev mailing list