Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE in LifecycleModule$LifecycleProvisionListener.onStopped #404

Open
pmezrin1 opened this issue Apr 17, 2020 · 0 comments
Open

NPE in LifecycleModule$LifecycleProvisionListener.onStopped #404

pmezrin1 opened this issue Apr 17, 2020 · 0 comments

Comments

@pmezrin1
Copy link

When LifecycleInjectorCreator.createInjector is failed, there is attempt to close
preDestroyMonitor. But it may not be initialized yet, it is causing NPE to be logged.

Suggestion is to check preDestroyMonitor for null before calling close() on it or log warn instead of error with stacktrace.

java.lang.NullPointerException: null
	at com.netflix.governator.LifecycleModule$LifecycleProvisionListener.onStopped(LifecycleModule.java:136) ~[governator-core-1.17.7.jar]
	at com.netflix.governator.SafeLifecycleListener.onStopped(SafeLifecycleListener.java:58) ~[governator-core-1.17.7.jar]
	at com.netflix.governator.LifecycleManager.notifyStartFailed(LifecycleManager.java:118) ~[governator-core-1.17.7.jar]
	at com.netflix.governator.LifecycleInjectorCreator.createInjector(LifecycleInjectorCreator.java:131) ~[governator-core-1.17.7.jar]
	at com.netflix.governator.LifecycleInjectorCreator.createInjector(LifecycleInjectorCreator.java:38) ~[governator-core-1.17.7.jar]
	at com.netflix.governator.InjectorBuilder.createInjector(InjectorBuilder.java:209) ~[governator-core-1.17.7.jar]
	at com.netflix.governator.InjectorBuilder.createInjector(InjectorBuilder.java:223) ~[governator-core-1.17.7.jar]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant