File: ReturnValueIgnored.md

package info (click to toggle)
error-prone-java 2.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 15,076 kB
  • sloc: java: 171,398; xml: 1,459; sh: 34; makefile: 7
file content (5 lines) | stat: -rw-r--r-- 327 bytes parent folder | download
1
2
3
4
5
Certain library methods do nothing useful if their return value is ignored. For
example, String.trim() has no side effects, and you must store the return value
of String.intern() to access the interned string. This check encodes a list of
methods in the JDK whose return value must be used and issues an error if they
are not.