[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-swing-dev
Subject:    <Swing Dev> Integrated: 8252721: Nested classes in Swing APIs rely on default constructors
From:       Prasanta Sadhukhan <psadhukhan () openjdk ! java ! net>
Date:       2020-09-18 4:03:25
Message-ID: hJHQRqTsZDGP2woRoTIe42anoJFQIq-gulMOFN2l47s=.117e0efe-1f84-45a1-8434-4ce67217b13a () github ! com
[Download RAW message or body]

On Tue, 8 Sep 2020 12:04:16 GMT, Prasanta Sadhukhan <psadhukhan@openjdk.org> wrote:

> Please review a fix for issue where it was seen that several
> nested classes rely on default constructors as part of their public API.
> 
> It's to be noted that "A no-arg public constructor is generated by the compiler for \
> a class if it does not declare an explicit constructor. While convenient, this is \
> inappropriate for many kinds of formal classes, both because the constructor will \
> have no javadoc and because the constructor may be unintended."  For the JDK, \
> classes intended to be used outside of the JDK, public classes in exported \
> packages, should not rely on default constructors. Proposed fix is to add explicit \
> public no-arg constructors for public classes and protected no-arg constructor for \
> public abstract classes for javax.swing module (as one part of overalll \
>                 java.desktop change)
> CSR: https://bugs.openjdk.java.net/browse/JDK-8252908

This pull request has now been integrated.

Changeset: 3ef2efb1
Author:    Prasanta Sadhukhan <psadhukhan@openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/3ef2efb1
Stats:     252 lines in 42 files changed: 0 ins; 252 del; 0 mod

8252721: Nested classes in Swing APIs rely on default constructors

Reviewed-by: prr

-------------

PR: https://git.openjdk.java.net/jdk/pull/72


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic