Redundant method call.
Project: http://git-wip-us.apache.org/repos/asf/commons-numbers/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-numbers/commit/230b0262 Tree: http://git-wip-us.apache.org/repos/asf/commons-numbers/tree/230b0262 Diff: http://git-wip-us.apache.org/repos/asf/commons-numbers/diff/230b0262 Branch: refs/heads/feature__NUMBERS-51__field Commit: 230b026267d745cbf9b09d0efef6af47b7da17d0 Parents: dd15519 Author: Gilles Sadowski <gil...@harfang.homelinux.org> Authored: Sat Jan 27 17:55:54 2018 +0100 Committer: Gilles Sadowski <gil...@harfang.homelinux.org> Committed: Sat Jan 27 17:55:54 2018 +0100 ---------------------------------------------------------------------- .../src/main/java/org/apache/commons/numbers/complex/Complex.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/230b0262/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java ---------------------------------------------------------------------- diff --git a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java index ee0c147..04b1959 100644 --- a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java +++ b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java @@ -203,7 +203,8 @@ public class Complex implements Serializable { * @return the norm. */ public double norm() { - return abs()*abs(); + final double a = abs(); + return a * a; } /**