<AWT Dev> [9] Review Request: JDK-8030093 Generify DataTrasfer classes
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Mon Jan 20 04:13:14 PST 2014
Hello.
As far as I know autoboxing is implemented via valueOf().
http://stackoverflow.com/questions/408661/what-code-does-the-compiler-generate-for-autoboxing
On 20.01.2014 13:42, Anthony Petrov wrote:
> i Petr,
>
> In a few places in
> src/share/classes/sun/awt/datatransfer/DataTransferer.java you're
> eliminating calls to Integer.valueOf() and instead assign the values
> directly. Note that this causes the auto-boxing to take place
> unconditionally, and thus may hurt the performance a bit. I suggest to
> leave the valueOf() calls as they are to take advantage of the
> Integer's cache. Please refer to the javadoc for this method for more
> details. The same suggestion applies to Long (and maybe Boolean, too?)
--
Best regards, Sergey.
More information about the awt-dev
mailing list