Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Classpath scanning on inner classes fails against JDK 11 bytecode level [SPR-17096] #21633
After upgrading to Spring 5.1 RC1 my application started failing with following exception -
Turned out, this is happening when spring tries to process classes which have inner class themselves. e.g. in.workingtheory.Application class has an inner class FailureGeneration. Application will not start unless I remove this inner class altogether or remove class in.workingtheory.Application from class path scanning.
This is only reproducible on JDK 11 and Spring 5.1 RC1 but works fine on JDK 10.
Sample project for reproducing this issue is attached.
Oracle JDK 11 Build 23 (64 Bit)
Affects: 5.1 RC1
Referenced from: commits e82efbc
Juergen Hoeller commented
This seems to be a consequence of our ASM 6.2 upgrade which only has experimental support for the JDK 11 bytecode level and doesn't activate it by default. We can get around it by declaring our visitors as