<Swing Dev> RFR : 8049893 Replace uses of 'new Integer()' with appropriate alternative across client classes

Phil Race philip.race at oracle.com
Fri Jul 11 18:04:59 UTC 2014


Here's the final set of changes including those 2 diffs.

http://cr.openjdk.java.net/~prr/8049893.1 
<http://cr.openjdk.java.net/%7Eprr/8049893/>

-phil.

On 07/11/2014 04:08 AM, Otávio Gonçalves de Santana wrote:
>
> JInternalFrame
> Because it has a method, line 1285, with int, setLayer(int), so it 
> will capture just to do boxing, so I forced the boxing to avoid this 
> method and go directly to setLayer(Integer), line 1254.
>
> JlayeredPane
> Done.
>
> BasicLookAndFeel
> Integer four //fixed
> How was talked 500 is not in cached range.
>
>
> On Fri, Jul 11, 2014 at 6:03 AM, Petr Pchelko <petr.pchelko at oracle.com 
> <mailto:petr.pchelko at oracle.com>> wrote:
>
>>     500 and 1000L are outside of the range [-127, 128]. Therefore
>>     they won't be cached.
>     Agreed, that's what I didn't think about.
>
>     With best regards. Petr.
>
>>     On Jul 11, 2014, at 1:00 PM, Andrej Golovnin
>>     <andrej.golovnin at gmail.com <mailto:andrej.golovnin at gmail.com>> wrote:
>>
>>     Hi Petr,
>>
>>         BasicLookAndFeel - making "shared Integers" and "shared
>>         longs" is pointless after your fix. Please inline.
>>
>>
>>     It's not pointless.
>>
>>      458         Integer fiveHundred = 500;
>>      459
>>      460         // *** Shared Longs
>>      461         Long oneThousand = 1000L;
>>
>>     500 and 1000L are outside of the range [-127, 128]. Therefore
>>     they won't be cached.
>>
>>     But this one:
>>
>>     676         Integer four = 4;
>>
>>     can be indeed inlined.
>>
>>     Best regards,
>>     Andrej Golovnin
>>
>>
>>         With best regards. Petr.
>>
>>>         On Jul 11, 2014, at 5:36 AM, Otávio Gonçalves de Santana
>>>         <otaviopolianasantana at gmail.com
>>>         <mailto:otaviopolianasantana at gmail.com>> wrote:
>>>
>>>         https://bugs.openjdk.java.net/browse/JDK-8049893
>>>         http://cr.openjdk.java.net/~prr/8049893/
>>>         <http://cr.openjdk.java.net/%7Eprr/8049893/>
>>>
>>>         -- 
>>>         Cheers!.
>>>
>>>         Otávio Gonçalves de Santana
>>>
>>>         blog: http://otaviosantana.blogspot.com.br/
>>>         twitter: http://twitter.com/otaviojava
>>>         site: _http://about.me/otaviojava_
>>>         55 (11) 98255-3513 <tel:55%20%2811%29%2098255-3513>
>>>
>>
>>
>
>
>
>
> -- 
> Cheers!.
>
> Otávio Gonçalves de Santana
>
> blog: http://otaviosantana.blogspot.com.br/
> twitter: http://twitter.com/otaviojava
> site: _http://about.me/otaviojava_
> 55 (11) 98255-3513
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20140711/2942dd2f/attachment.html>


More information about the swing-dev mailing list