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

CodeQL: Fix "Dereferenced variable may be null " in KiwiSecurity #895

Merged

Conversation

sleberknight
Copy link
Member

  • Change getKeyStore methods so that they return an empty Optional if either path or password is null.
  • Update Javadocs to match new implementation and explain the intent of these methods is to load an existing key store, not create a new one.
  • Fix several tests that were asserting that the returned Optional was not null instead of it containing a value.

Fixes #861

* Change getKeyStore methods so that they return an empty Optional if
  either path or password is null.
* Update Javadocs to match new implementation and explain the intent
  of these methods is to load an existing key store, not create a new one.
* Fix several tests that were asserting that the returned Optional was not
  null instead of it containing a value.

Fixes #861
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@sleberknight sleberknight merged commit 2e70007 into master Jan 31, 2023
@sleberknight sleberknight deleted the 861-codeql-fix-Dereferenced-variable-may-be-null branch January 31, 2023 17:28
sleberknight added a commit that referenced this pull request Jan 31, 2023
* Change getKeyStore methods so that they return an empty Optional if
  either path or password is null.
* Update Javadocs to match new implementation and explain the intent
  of these methods is to load an existing key store, not create a new one.
* Fix several tests that were asserting that the returned Optional was not
  null instead of it containing a value.

Fixes #861
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.

Fix code scanning alert - Dereferenced variable may be null
3 participants