aboutsummaryrefslogtreecommitdiffstats
path: root/src/excelant
diff options
context:
space:
mode:
Diffstat (limited to 'src/excelant')
-rw-r--r--src/excelant/java/org/apache/poi/ss/excelant/util/ExcelAntWorkbookUtil.java3
-rw-r--r--src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java7
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