From 32fa21596d881af9a0b6bd3a31f997659d6f5c2d Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Tue, 22 Feb 2022 08:49:15 +0000 Subject: [PATCH] sonar issues git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898311 13f79535-47bb-0310-9956-ffa450edef68 --- .../formula/OperationEvaluationContext.java | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/poi/src/main/java/org/apache/poi/ss/formula/OperationEvaluationContext.java b/poi/src/main/java/org/apache/poi/ss/formula/OperationEvaluationContext.java index 12e88abd51..29157de540 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/OperationEvaluationContext.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/OperationEvaluationContext.java @@ -313,28 +313,16 @@ public final class OperationEvaluationContext { switch (part1refType) { case COLUMN: firstRow = 0; - if (part2refType.equals(NameType.COLUMN)) { - lastRow = ssVersion.getLastRowIndex(); - firstCol = parseRowRef(refStrPart1); - lastCol = parseRowRef(refStrPart2); - } else { - lastRow = ssVersion.getLastRowIndex(); - firstCol = parseColRef(refStrPart1); - lastCol = parseColRef(refStrPart2); - } + lastRow = ssVersion.getLastRowIndex(); + firstCol = parseColRef(refStrPart1); + lastCol = parseColRef(refStrPart2); break; case ROW: // support of cell range in the form of integer:integer firstCol = 0; - if (part2refType.equals(NameType.ROW)) { - firstRow = parseColRef(refStrPart1); - lastRow = parseColRef(refStrPart2); - lastCol = ssVersion.getLastColumnIndex(); - } else { - lastCol = ssVersion.getLastColumnIndex(); - firstRow = parseRowRef(refStrPart1); - lastRow = parseRowRef(refStrPart2); - } + lastCol = ssVersion.getLastColumnIndex(); + firstRow = parseRowRef(refStrPart1); + lastRow = parseRowRef(refStrPart2); break; case CELL: CellReference cr; -- 2.39.5