Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Ignoring method return values can lead to unexpected program behavior.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

EXP00-J

Medium

Probable

Medium

P8

L2

Automated Detection

Tool
Version
Checker
Description
CodeSonar
Include Page
CodeSonar_V
CodeSonar_V

JAVA.NULL.RET.UNCHECKED
JAVA.FUNCS.IRV

Call Might Return Null (Java)
Ignored Return Value (Java)

Coverity7.5CHECKED_RETURNImplemented
Parasoft Jtest
9.5PB.USC.NASSIG SonarQube Java Plugin
Include Page
Parasoft_V
Parasoft_V
CERT.EXP00.NASSIG
CERT.EXP00.AECB
Ensure method and constructor return values are used
Avoid "try", "catch" and "finally" blocks with empty bodies
PVS-Studio

Include Page
PVS-Studio_V
PVS-Studio_V

V6010, V6101
SonarQube
Include Page
SonarQube
Java Plugin
_V
SonarQube
Java Plugin
_V

S2201

S899

Return values from functions without side effects should not be ignored

Return values should not be ignored when they contain the operation status code

Implemented for methods of immutable API classes
SpotBugs

Include Page
SpotBugs_V
SpotBugs_V

RV_RETURN_VALUE_IGNORED
RV_RETURN_VALUE_IGNORED_INFERRED
RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT
RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED
RR_NOT_CHECKED
SR_NOT_CHECKED

Implemented

Related Guidelines

Bibliography

...


...

Image Modified Image Modified Image Modified