]> source.dussan.org Git - poi.git/commitdiff
sonar issues
authorPJ Fanning <fanningpj@apache.org>
Tue, 22 Feb 2022 08:49:15 +0000 (08:49 +0000)
committerPJ Fanning <fanningpj@apache.org>
Tue, 22 Feb 2022 08:49:15 +0000 (08:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898311 13f79535-47bb-0310-9956-ffa450edef68

poi/src/main/java/org/apache/poi/ss/formula/OperationEvaluationContext.java

index 12e88abd5144559ee17c8eba22acac1c2ce0bdae..29157de540cc26876e6eb012707bbd0e4bc70e8b 100644 (file)
@@ -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;