RFR: 8297778: Modernize and improve module jdk.sctp

Per Minborg pminborg at openjdk.org
Wed Nov 30 08:21:17 UTC 2022


On Tue, 29 Nov 2022 17:44:18 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

> It is a bit unusual to use a local class as a holder class (the typical manner is to a have a private static final nested class) but we didn't have local classes until recently - so maybe that's OK. I assume there's only one version of that class and it is static?

As I understand it, there are zero instances of the class as it is only declared. The class only contains a class variable. In a recent Java version, classes that are "effectively static" (my wording) (i.e. does not refernece the outer class) does not hold a reference to the outer class. So, it is not static but in this case, I believe it does not matter because 1) it is never instantiated and 2) if it was indeed instantiated, it is "effectively static".

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

PR: https://git.openjdk.org/jdk/pull/11418


More information about the security-dev mailing list