Hi Sergey,

I understand that with the new jep, we no longer need to explicitly write the 
constructor to avoid the synthetic accessor methods generated by the compiler. 
AFAIK, each inner class declared  results in a class file being generated 
rather than each default constructor. Could you clarify this a bit more?
I also have another question: In general, is it better to provide a manual 
method to avoid the generation of synthetic accessor methods? In the context of 
this code change, I fail to see how it would have helped by writing explicit 
method rather than letting the compiler generate an accessor method.

Thanks,
Krishna

-----Original Message-----
From: Sergey Bylokhov 
Sent: Friday, August 10, 2018 8:25 AM
To: awt-dev@openjdk.java.net; swing-...@openjdk.java.net
Subject: <Swing Dev> [12] Review Request: 8209340 The code which avoids 
synthetic accessors has become outdated

Hello.
Please review the small cleanup for jdk12.

Bug: https://bugs.openjdk.java.net/browse/JDK-8209340
Webrev: http://cr.openjdk.java.net/~serb/8209340/webrev.00

To avoid synthetic accessors in the class files, in some of our private nested 
classes the empty default constructor was added. (Each default constructor 
dropped one additional class file on the file system)

After JEP 181[1] was integrated to jdk11 these default constructors can be 
removed because such workaround is not necessary anymore.

[1] http://openjdk.java.net/jeps/181

--
Best regards, Sergey.

Reply via email to