You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2015/11/03 12:06:48 UTC
[3/6] [math] Avoid a false positive findbugs warning.
Avoid a false positive findbugs warning.
The source code tests an angle using "angle > (FastMath.PI - 1.0e-10)".
As the compiler does the subtraction of the constants directly, findbugs
complains about a "Rough value of Math.PI found: 3.141592653489793".
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/fae8d868
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/fae8d868
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/fae8d868
Branch: refs/heads/MATH_3_X
Commit: fae8d86872ad332512f99c1edc75e7e35d7bcfbc
Parents: 8c2aa68
Author: Luc Maisonobe <lu...@apache.org>
Authored: Tue Nov 3 11:18:59 2015 +0100
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Tue Nov 3 11:18:59 2015 +0100
----------------------------------------------------------------------
findbugs-exclude-filter.xml | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-math/blob/fae8d868/findbugs-exclude-filter.xml
----------------------------------------------------------------------
diff --git a/findbugs-exclude-filter.xml b/findbugs-exclude-filter.xml
index b971772..0216613 100644
--- a/findbugs-exclude-filter.xml
+++ b/findbugs-exclude-filter.xml
@@ -163,6 +163,13 @@
<Bug pattern="DLS_DEAD_LOCAL_STORE" />
</Match>
+ <!-- Spurious: Findbugs confused by FastMath.PI - 1.0e-10 -->
+ <Match>
+ <Class name="org.apache.commons.math3.geometry.euclidean.threed.Plane" />
+ <Method name="isSimilarTo" params="org.apache.commons.math3.geometry.euclidean.threed.Plane" returns="boolean" />
+ <Bug pattern="CNT_ROUGH_CONSTANT_VALUE" />
+ </Match>
+
<!-- the following expositions of internal representation are intentional and documented -->
<Match>
<Class name="org.apache.commons.math3.stat.regression.RegressionResults"/>