Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
IllegalStateException when inner class has private constructor on Java>8 #958
when I run the following code, it works with Java 8 but not with Java 11
referenced this issue
Mar 8, 2019
I think the issue is due to JEP181 JDK11 stops creating special access method for nested classes. In addition, classes go through the transformer chain one by one, which means there are chances (I'm not sure how the order is determined, alphabet order?) the nest host class (OuterClass in the test case) passes through the chain before the nest member class (InnerSingleton in the test case). In that case, the constructor is still private which caused the compilation error.