diff options
author | Dominik Stadler <centic@apache.org> | 2017-09-16 08:28:38 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2017-09-16 08:28:38 +0000 |
commit | 399381da8df5e6926bbc4cc4a51b3d0723c4a6c7 (patch) | |
tree | afd5a45d5c70298ce70681e7d4f3277457eccb4e /src/excelant | |
parent | 0cfa1ede4cbc9c00d2f5d3946ae9f57a6dd74d48 (diff) | |
download | poi-399381da8df5e6926bbc4cc4a51b3d0723c4a6c7.tar.gz poi-399381da8df5e6926bbc4cc4a51b3d0723c4a6c7.zip |
Remove unnecessary local variables
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808518 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/excelant')
-rw-r--r-- | src/excelant/java/org/apache/poi/ss/excelant/util/ExcelAntWorkbookUtil.java | 3 | ||||
-rw-r--r-- | src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java | 7 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/excelant/java/org/apache/poi/ss/excelant/util/ExcelAntWorkbookUtil.java b/src/excelant/java/org/apache/poi/ss/excelant/util/ExcelAntWorkbookUtil.java index fa98628eee..2a745dd0ec 100644 --- a/src/excelant/java/org/apache/poi/ss/excelant/util/ExcelAntWorkbookUtil.java +++ b/src/excelant/java/org/apache/poi/ss/excelant/util/ExcelAntWorkbookUtil.java @@ -154,9 +154,8 @@ public class ExcelAntWorkbookUtil extends Typedef { } UDFFinder udff1 = new DefaultUDFFinder(names, functions); - UDFFinder udff = new AggregatingUDFFinder(udff1); - return udff; + return new AggregatingUDFFinder(udff1); } diff --git a/src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java b/src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java index f1c526bf9d..2e2e62bf81 100644 --- a/src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java +++ b/src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java @@ -77,11 +77,8 @@ public class CalculateMortgageFunction implements FreeRefFunction { public double calculateMortgagePayment( double p, double r, double y ) { double i = r / 12 ; double n = y * 12 ; - - double principalAndInterest = - p * (( i * Math.pow((1 + i),n ) ) / ( Math.pow((1 + i),n) - 1)) ; - - return principalAndInterest ; + + return p * (( i * Math.pow((1 + i),n ) ) / ( Math.pow((1 + i),n) - 1)); } /** * Excel does not support infinities and NaNs, rather, it gives a #NUM! error in these cases |