<Swing Dev> RFR JDK-8250811: Address reliance on default constructors in the javax.swing.plaf.multi APIs
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Wed Aug 5 02:47:34 UTC 2020
On 04.08.2020 14:05, Philip Race wrote:
>
> Section 6.4 of the 23 year old coding guidelines
> https://www.oracle.com/technetwork/java/codeconventions-150003.pdf
> appear to suggest {} for empty methods.
>
> However I know this only because I went to look.
> I would have guessed the opposite .. and prefer that opposite.
On the other side lots of classes in the client-libs(for example in the "java.awt.event" package) use such style:
https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/event/ComponentAdapter.java
https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/event/ContainerAdapter.java
https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/event/KeyAdapter.java
etc.
So maybe this is a common practice
--
Best regards, Sergey.
More information about the swing-dev
mailing list