Jetbrains has recently decided that java.util.Optional (as well as Guava's com.google.common.base.Optional) shouldn't be used as field or parameter type... thanks, but no thanks... How can this warning be disabled?
As a side note: triggering warnings on this specific usage of Optional seems completely unjustified...
There are no optional parameters in Java. What you can do is overloading the functions and then passing default values.
From IntelliJ's preferences/settings:
Editor
> Inspections
Java
> Abstraction issues
'Optional' used as field or parameter type
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With