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

Fix NPE when calling .scope() on a singleton stop in PreDestroyMonitor #315

Merged
merged 3 commits into from Jul 25, 2016

Conversation

elandau
Copy link
Contributor

@elandau elandau commented Jul 22, 2016

No description provided.

@@ -188,7 +194,13 @@ public Boolean visitEagerSingleton() {
*/
@Override
public Boolean visitScope(Scope scope) {
Provider<ScopeCleanupMarker> scopedMarkerProvider = scope.scope(MARKER_KEY, markerProvider);
final Provider<ScopeCleanupMarker> scopedMarkerProvider;
if (scope.equals(Scopes.SINGLETON) || scope.equals(LazySingletonScope.get()) || scope.equals(FineGrainedLazySingletonScope.get())) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be ideal if these scopes can be programmatically found instead of being hardcoded here.

@elandau elandau merged commit b36b2fa into Netflix:master Jul 25, 2016
@elandau elandau deleted the singleton_scope_npe branch October 14, 2016 16:41
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

Successfully merging this pull request may close these issues.

None yet

2 participants