Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Naah this was not the issue. It seems like usage detail was not present for Optional so ide suggested to change the preference to warning rather error. I chose that and now it shows a warning and not error anymore. Commented Jul 28, 2017 at 17:11
  • cleaning intellij ide cache didn't solve the problem for me. then I checked if I have this as an exclusion there I found it!!! but I didn't add Optional in exclusion list. I'm a guy who used to code in eclipse and now for some reason I switched to intellij. It's really not worth the effort trying to use this intelligent ide that can't solve usual stupid problems. Commented Sep 1, 2020 at 10:10
  • Thanks! I think I messed up using SonarLint and somehow added this config by mistake
    – Alejandro
    Commented Aug 8, 2022 at 13:53