- ALM used - GitHub
- CI system used - Github Actions + AWS Code Pipelines
- Languages of the repository - Java
- Only if the SonarCloud project is public, the URL - GitHub - govuk-one-login/ipv-core-back
- Error observed - Warning S3655 triggered
Call "Optional#isPresent()" or "!Optional#isEmpty()" before accessing the value
when I believe it to be impossible- Line 428 of
CheckExistingIdentityHandler.java
- Lines 461 and 470 of
ProcessCandidateIdentityHandler.java
- Line 428 of
- Steps to reproduce - Remove the
SuppressWarning
annotation - Potential workaround - Use
SuppressWarning
Screenshot added for context and because I can no longer see the original analysis to copy/paste from it (I didn’t find this forum until after screenshotting it and fixing the issue).