aboutsummaryrefslogtreecommitdiffstats
path: root/poi
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2022-07-16 20:21:22 +0000
committerPJ Fanning <fanningpj@apache.org>2022-07-16 20:21:22 +0000
commit773ad5e8251a43b822793cb265a04a80793be4c7 (patch)
tree4b8f2a17a0784c1b57949c5e79481b8d406e01dd /poi
parent46b14041bf1fd3eaf298bac69bf1927b65459d1e (diff)
downloadpoi-773ad5e8251a43b822793cb265a04a80793be4c7.tar.gz
poi-773ad5e8251a43b822793cb265a04a80793be4c7.zip
[github-356] accept some of the changes in this PR (not all)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902784 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi')
-rw-r--r--poi/src/main/java/org/apache/poi/ss/formula/eval/FunctionEval.java2
-rw-r--r--poi/src/main/java/org/apache/poi/ss/formula/functions/MathX.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/poi/src/main/java/org/apache/poi/ss/formula/eval/FunctionEval.java b/poi/src/main/java/org/apache/poi/ss/formula/eval/FunctionEval.java
index 6693cc5459..b314afd0fd 100644
--- a/poi/src/main/java/org/apache/poi/ss/formula/eval/FunctionEval.java
+++ b/poi/src/main/java/org/apache/poi/ss/formula/eval/FunctionEval.java
@@ -428,7 +428,7 @@ public final class FunctionEval {
Collection<String> lst = new TreeSet<>();
for (int i = 0; i < functions.length; i++) {
Function func = functions[i];
- if (func != null && (func instanceof NotImplementedFunction)) {
+ if ((func instanceof NotImplementedFunction)) {
FunctionMetadata metaData = FunctionMetadataRegistry.getFunctionByIndex(i);
lst.add(metaData.getName());
}
diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/MathX.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/MathX.java
index 2df9e1f083..71c62883ff 100644
--- a/poi/src/main/java/org/apache/poi/ss/formula/functions/MathX.java
+++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/MathX.java
@@ -414,7 +414,7 @@ final class MathX {
*/
public static double nChooseK(int n, int k) {
double d = 1;
- if (n<0 || k<0 || n<k) {
+ if (k < 0 || n < k) {
d= Double.NaN;
}
else {