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:07:52 UTC
[3/5] [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/93f8d0e2
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/93f8d0e2
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/93f8d0e2
Branch: refs/heads/master
Commit: 93f8d0e237d0205febc64c43c2a77b2dc6e337df
Parents: f139542
Author: Luc Maisonobe <lu...@apache.org>
Authored: Tue Nov 3 10:34:38 2015 +0100
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Tue Nov 3 10:34:38 2015 +0100
----------------------------------------------------------------------
findbugs-exclude-filter.xml | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-math/blob/93f8d0e2/findbugs-exclude-filter.xml
----------------------------------------------------------------------
diff --git a/findbugs-exclude-filter.xml b/findbugs-exclude-filter.xml
index a99e76f..b4e8f08 100644
--- a/findbugs-exclude-filter.xml
+++ b/findbugs-exclude-filter.xml
@@ -135,6 +135,13 @@
<Bug pattern="DLS_DEAD_LOCAL_STORE" />
</Match>
+ <!-- Spurious: Findbugs confused by FastMath.PI - 1.0e-10 -->
+ <Match>
+ <Class name="org.apache.commons.math4.geometry.euclidean.threed.Plane" />
+ <Method name="isSimilarTo" params="org.apache.commons.math4.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.math4.stat.regression.RegressionResults"/>