<AWT Dev> <Swing Dev>  Review Request: 8209340 The code which avoids synthetic accessors has become outdated
krishna.addepalli at oracle.com
Tue Aug 14 02:32:08 UTC 2018
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.
From: Sergey Bylokhov
Sent: Friday, August 10, 2018 8:25 AM
To: awt-dev at openjdk.java.net; swing-dev at openjdk.java.net
Subject: <Swing Dev>  Review Request: 8209340 The code which avoids synthetic accessors has become outdated
Please review the small cleanup for jdk12.
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 was integrated to jdk11 these default constructors can be removed because such workaround is not necessary anymore.
Best regards, Sergey.
More information about the awt-dev