Character, Byte, Short valueOf instead of new instance (original) (raw)
Andrej Golovnin andrej.golovnin at gmail.com
Tue Jul 1 12:57:32 UTC 2014
- Previous message: Character, Byte, Short valueOf instead of new instance
- Next message: Character, Byte, Short valueOf instead of new instance
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Pavel,
I'm sorry I have totally forgotten to mention it. But I think that changes to the classes in the package "jdk.internal.org.objectweb.asm" should be done directly in the ASM library. In other case you may have conflicts when a new version of the ASM library is integrated into JDK next time. I hope you didn't committed the patch for the Longs yet. There were also changes to the classes in the package "jdk.internal.org.objectweb.asm".
Best regards, Andrej Golovnin
On Tue, Jul 1, 2014 at 2:39 PM, Pavel Rappo <pavel.rappo at oracle.com> wrote:
Otavio,
As with [1], I created an issue to track the progress and also made 2 webrevs. One for the original patch and one for the changes similar to those we discussed in [1]. https://bugs.openjdk.java.net/browse/JDK-8048874 http://cr.openjdk.java.net/~prappo/8048874/webrev.00 http://cr.openjdk.java.net/~prappo/8048874/webrev.01 ----------------------------------------------------------------------- [1] http://mail.openjdk.java.net/pipermail/core-libs-dev/2014-June/027197.html Thanks, -Pavel On 26 Jun 2014, at 16:07, Chris Hegarty <chris.hegarty at oracle.com> wrote: > 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 > - if(proto.equals(new Character(WILDCARDTOKEN).toString())) { > + if(proto.equals(Character.valueOf(WILDCARDTOKEN).toString())) { // <<_ _Character.toString(WILDCARDTOKEN)_ _> if(debug) {System.out.println("simple presence assertion");} > return true; > } > > -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> >
- Previous message: Character, Byte, Short valueOf instead of new instance
- Next message: Character, Byte, Short valueOf instead of new instance
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]