Most visited

Recently visited


public abstract @interface CheckResult
implements Annotation

Denotes that the annotated method returns a result that it typically is an error to ignore. This is usually used for methods that have no side effect, so calling it without actually looking at the result usually means the developer has misunderstood what the method does.


public @CheckResult String trim(String s) { return s.trim(); }
  s.trim(); // this is probably an error
  s = s.trim(); // ok


Inherited methods

From interface java.lang.annotation.Annotation