RFR: 8283706: Add final or sealed modifier to appropriate javax.swing API classes

Sergey Bylokhov serb at openjdk.java.net
Thu Apr 7 18:40:35 UTC 2022


On Thu, 7 Apr 2022 04:43:48 GMT, Joe Darcy <darcy at openjdk.org> wrote:

>> Just to double-check, it is fine to have it in the output of the getPermittedSubclasses for the public class as well?
>
> I'm not certain what question you are asking. If the question is, is it fine for core reflection to return non-public information about the class, in general sure. For example, in jshell evaluating
> StringBuilder.class.getSuperclass()
> will yield
>  class java.lang.AbstractStringBuilder
> which is the non-public superclass of StringBuffer and StringBuilder.
> 
> If the question is, do the compatibility expectations of the platform include such visible non-public implementation artifacts? The answer is no; it is fine for those details to evolve and users shouldn't rely on them.
> 
> Is there another aspect of the change that was a concern?

Thank you for your clarification.

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

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



More information about the client-libs-dev mailing list