From: PJ Fanning Date: Tue, 22 Feb 2022 08:49:15 +0000 (+0000) Subject: sonar issues X-Git-Tag: REL_5_2_1~24 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=32fa21596d881af9a0b6bd3a31f997659d6f5c2d;p=poi.git sonar issues git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898311 13f79535-47bb-0310-9956-ffa450edef68 --- 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;