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

add missing null checks to public constructors #167

Merged
merged 1 commit into from
Apr 16, 2015

Conversation

scottcarr
Copy link
Contributor

Hello, I'm working on a static analysis tool that looks for missing null checks. It suggested you add these checks:

Reasons:

ActivationCache constructor: if cachePruner is null, the constructor will always throw an exception

Pipeline constructor: fs activationCache is null and subsequently Activate or Deactivate is called, it will throw an exception (because Activate and Deactive both dereference activationCache)

ActivationCacheStrategy constructor: if activationCache is null and subsequently Activate or Deactivate is called, it will throw an exception (because Activate and Deactive both dereference activationCache)

CompiledModuleLoaderPlugin constructor: if assemblyNameRetriever is null and subsequently LoadModules is called, it will throw an exception because LoadModules dereferences assemblyNameRetriever

@scottcarr scottcarr changed the title add missing null checks to public methods add missing null checks to public constructors Apr 15, 2015
scott-xu added a commit that referenced this pull request Apr 16, 2015
add missing null checks to public constructors
@scott-xu scott-xu merged commit e94cbae into ninject:master Apr 16, 2015
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.

2 participants