diff options
Diffstat (limited to 'src/java/org/apache')
4 files changed, 4 insertions, 3 deletions
diff --git a/src/java/org/apache/poi/hpsf/Section.java b/src/java/org/apache/poi/hpsf/Section.java index 0c97a0e68a..3c8e5b7ce8 100644 --- a/src/java/org/apache/poi/hpsf/Section.java +++ b/src/java/org/apache/poi/hpsf/Section.java @@ -285,7 +285,7 @@ public class Section /* * Extract the dictionary (if available). */ - dictionary = (Map) getProperty(0); + dictionary = (Map<Long,String>) getProperty(0); } diff --git a/src/java/org/apache/poi/ss/formula/eval/OperandResolver.java b/src/java/org/apache/poi/ss/formula/eval/OperandResolver.java index 8e0ea3ba85..af4cb81b31 100644 --- a/src/java/org/apache/poi/ss/formula/eval/OperandResolver.java +++ b/src/java/org/apache/poi/ss/formula/eval/OperandResolver.java @@ -57,7 +57,7 @@ public final class OperandResolver { */ public static ValueEval getSingleValue(ValueEval arg, int srcCellRow, int srcCellCol) throws EvaluationException { - ValueEval result; + final ValueEval result; if (arg instanceof RefEval) { result = chooseSingleElementFromRef((RefEval) arg); } else if (arg instanceof AreaEval) { diff --git a/src/java/org/apache/poi/ss/formula/functions/Countif.java b/src/java/org/apache/poi/ss/formula/functions/Countif.java index 01f608a54b..9023815c36 100644 --- a/src/java/org/apache/poi/ss/formula/functions/Countif.java +++ b/src/java/org/apache/poi/ss/formula/functions/Countif.java @@ -491,7 +491,7 @@ public final class Countif extends Fixed2ArgFunction { */ private static ValueEval evaluateCriteriaArg(ValueEval arg, int srcRowIndex, int srcColumnIndex) { try { - return OperandResolver.getSingleValue(arg, srcRowIndex, (short)srcColumnIndex); + return OperandResolver.getSingleValue(arg, srcRowIndex, srcColumnIndex); } catch (EvaluationException e) { return e.getErrorEval(); } diff --git a/src/java/org/apache/poi/ss/formula/functions/Sumifs.java b/src/java/org/apache/poi/ss/formula/functions/Sumifs.java index 087b72bc12..ebdddb69f7 100644 --- a/src/java/org/apache/poi/ss/formula/functions/Sumifs.java +++ b/src/java/org/apache/poi/ss/formula/functions/Sumifs.java @@ -54,6 +54,7 @@ public final class Sumifs implements FreeRefFunction { public static final FreeRefFunction instance = new Sumifs(); public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) { + // need at least 3 arguments and need to have an odd number of arguments (sum-range plus x*(criteria_range, criteria)) if(args.length < 3 || args.length % 2 == 0) { return ErrorEval.VALUE_INVALID; } |