squid:S3655 (Optional value should only be accessed after calling isPresent()) being fired even though control will never reach the optional.get() call

Since an other thread for a similar issue was created, I’m closing this one, please continue the discussion there if you still face issue.