RFR: 8275342: Change nested classes in java.prefs to static nested classes

Andrey Turbanov duke at openjdk.java.net
Fri Oct 15 20:15:06 UTC 2021


On Fri, 15 Oct 2021 18:51:44 GMT, Andrey Turbanov <duke at openjdk.java.net> wrote:

> Non-static classes hold a link to their parent classes, which can be avoided.

src/java.prefs/macosx/classes/java/util/prefs/MacOSXPreferencesFile.java line 102:

> 100:     }
> 101: 
> 102:     private class SyncTask extends TimerTask {

IDEA suggested to add `static` here too. But this class is unused. And I think it's better to drop it.

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

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


More information about the core-libs-dev mailing list