RFR: 8142487: Cleanup sun.invoke.util.Wrapper zeroes to be both reliable and lazy

Claes Redestad claes.redestad at oracle.com
Tue Nov 17 11:43:31 UTC 2015


On 2015-11-17 12:22, Vladimir Ivanov wrote:
> src/java.base/share/classes/java/lang/invoke/LambdaForm.java:
> + private static void createFormsFor(BasicType type) {
> + synchronized (LF_identity) {
>
> Looks a bit confusing since the method touches both LF_identity and 
> LF_zero array now. Why not simply make the method synchronized? 
> LambdaForm is package-private and shouldn't leak outside j.l.i.

Fixed.

>
> test/sun/invoke/util/WrapperTest.java:
> @run junit/othervm
>
> Why do you specify /othervm mode?

Changed to @run junit

http://cr.openjdk.java.net/~redestad/8142487/webrev.05

Thanks!

/Claes



More information about the core-libs-dev mailing list