resources.report.rules.spotbugs.DM_INVALID_MIN_MAX.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sanity4j Show documentation
Show all versions of sanity4j Show documentation
Sanity4J was created to simplify running multiple static code
analysis tools on the Java projects. It provides a single entry
point to run all the selected tools and produce a consolidated
report, which presents all findings in an easily accessible
manner.
The newest version!
DM_INVALID_MIN_MAX
Dm: Incorrect combination of Math.max and Math.min (DM_INVALID_MIN_MAX)
This code tries to limit the value bounds using the construct like Math.min(0, Math.max(100, value)). However the order of
the constants is incorrect: it should be Math.min(100, Math.max(0, value)). As the result this code always produces the same result
(or NaN if the value is NaN).