You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make DefaultListableBeanFactory's javax.inject.Provider implementation invisible for nested class introspection [SPR-17014] #21552
DefaultListableBeanFactory has some nested types that are designed to protect the runtime against class not found errors when certain libraries are not on the classpath (in particular JSR330). Unfortunately, some static analysis tools cannot get past the fact that one of those inner classes implements an interface Provider that is not available at runtime.
Here's a program that fails when javax.inject is not on the classpath:
There's an easy way out: moving Jsr330DependencyProvider to a nested class of Jsr330ProviderFactory, that is, one level deeper. This allows us to keep them as non-static inner classes but nevertheless make the HotSpot/Graal introspection problem go away, as far as I can tell.
Activity
spring-projects-issues commentedon Jul 6, 2018
Juergen Hoeller commented
There's an easy way out: moving
Jsr330DependencyProviderto a nested class ofJsr330ProviderFactory, that is, one level deeper. This allows us to keep them as non-static inner classes but nevertheless make the HotSpot/Graal introspection problem go away, as far as I can tell.