org.jetbrains.annotations.Contract(pure=true)
CheckReturnValue
javax.annotation.CheckReturnValue
javax.annotation.CheckReturnValue
For many methods, ignoring the result is perfectly
legitimate, but for some methods it is almost certainly an error. Examples of methods where ignoring
the result is likely an error include java.io.inputStream.read()
,
which returns the number of bytes actually read, and any method on
java.lang.String
or java.math.BigInteger
. These methods do not produce side-effects and thus pointless if ignored.
Use the panel below to specify the names of the classes containing the methods and method name patterns of the methods you wish to check. Class names are specified using their fully-qualified names and apply to both the class and all its inheritors. Method name patterns use the Java regular expression syntax.
Use the checkbox below to report all calls to non-library methods whose result is ignored