]> source.dussan.org Git - poi.git/commitdiff
extracted local variable
authorJosh Micich <josh@apache.org>
Thu, 13 Nov 2008 19:41:02 +0000 (19:41 +0000)
committerJosh Micich <josh@apache.org>
Thu, 13 Nov 2008 19:41:02 +0000 (19:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@713801 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/ss/formula/EvaluationCache.java

index 1681cc7ebab3f5745053091a85f5a13fb3748836..8b0b7cf2716aba45a81c327c02048f8bfacaac61 100644 (file)
@@ -53,7 +53,9 @@ final class EvaluationCache {
        public void notifyUpdateCell(int bookIndex, int sheetIndex, EvaluationCell cell) {
                FormulaCellCacheEntry fcce = _formulaCellCache.get(cell);
 
-               Loc loc = new Loc(bookIndex, sheetIndex, cell.getRowIndex(), cell.getColumnIndex());
+               int rowIndex = cell.getRowIndex();
+               int columnIndex = cell.getColumnIndex();
+               Loc loc = new Loc(bookIndex, sheetIndex, rowIndex, columnIndex);
                PlainValueCellCacheEntry pcce = _plainCellCache.get(loc);
 
                if (cell.getCellType() == HSSFCell.CELL_TYPE_FORMULA) {
@@ -61,11 +63,11 @@ final class EvaluationCache {
                                fcce = new FormulaCellCacheEntry();
                                if (pcce == null) {
                                        if (_evaluationListener != null) {
-                                               _evaluationListener.onChangeFromBlankValue(sheetIndex, cell.getRowIndex(),
-                                                               cell.getColumnIndex(), cell, fcce);
+                                               _evaluationListener.onChangeFromBlankValue(sheetIndex, rowIndex,
+                                                               columnIndex, cell, fcce);
                                        }
-                                       updateAnyBlankReferencingFormulas(bookIndex, sheetIndex, cell.getRowIndex(),
-                                                       cell.getColumnIndex());
+                                       updateAnyBlankReferencingFormulas(bookIndex, sheetIndex, rowIndex,
+                                                       columnIndex);
                                }
                                _formulaCellCache.put(cell, fcce);
                        } else {
@@ -89,11 +91,10 @@ final class EvaluationCache {
                                        pcce = new PlainValueCellCacheEntry(value);
                                        if (fcce == null) {
                                                if (_evaluationListener != null) {
-                                                       _evaluationListener.onChangeFromBlankValue(sheetIndex, cell
-                                                                       .getRowIndex(), cell.getColumnIndex(), cell, pcce);
+                                                       _evaluationListener.onChangeFromBlankValue(sheetIndex, rowIndex, columnIndex, cell, pcce);
                                                }
                                                updateAnyBlankReferencingFormulas(bookIndex, sheetIndex,
-                                                               cell.getRowIndex(), cell.getColumnIndex());
+                                                               rowIndex, columnIndex);
                                        }
                                        _plainCellCache.put(loc, pcce);
                                }
@@ -153,7 +154,7 @@ final class EvaluationCache {
                if (a == null) {
                        return false;
                }
-               Class cls = a.getClass();
+               Class<?> cls = a.getClass();
                if (cls != b.getClass()) {
                        // value type is changing
                        return false;