shapesecurity / shape-functional-java

add some FP familiarity to a Java project
Apache License 2.0
8 stars 7 forks source link

Add CheckReturnValue annotation #32

Closed bakkot closed 7 years ago

bakkot commented 7 years ago

This annotation gives a compiler warning when an annotated method or a method of an annotated class (including both static and instance methods and methods in nested classes and subclasses) is used a position which does not make use of the return value of that method.

For example, someImmutableSet.add(0); will now give a compiler warning.