diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2016-05-20 22:05:00 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2016-05-20 22:05:00 +0000 |
commit | 65ebd480fe7d5b48e53207dee646bac11578bbe8 (patch) | |
tree | 6680dcb5838552f4eba0566f7558501ef83043cc /src/java | |
parent | 1ccc643be20dcfef5bdeb4d399a32e4da77f8915 (diff) | |
download | poi-65ebd480fe7d5b48e53207dee646bac11578bbe8.tar.gz poi-65ebd480fe7d5b48e53207dee646bac11578bbe8.zip |
findbugs fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1744802 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationWorkbook.java | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationWorkbook.java b/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationWorkbook.java index a42815a07e..b936a54760 100644 --- a/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationWorkbook.java +++ b/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationWorkbook.java @@ -34,8 +34,6 @@ import org.apache.poi.ss.usermodel.Workbook; * Represents a workbook being used for forked evaluation. Most operations are delegated to the * shared master workbook, except those that potentially involve cell values that may have been * updated after a call to {@link #getOrCreateUpdatableCell(String, int, int)}. - * - * @author Josh Micich */ final class ForkedEvaluationWorkbook implements EvaluationWorkbook { @@ -69,15 +67,9 @@ final class ForkedEvaluationWorkbook implements EvaluationWorkbook { } public void copyUpdatedCells(Workbook workbook) { - String[] sheetNames = new String[_sharedSheetsByName.size()]; - _sharedSheetsByName.keySet().toArray(sheetNames); - OrderedSheet[] oss = new OrderedSheet[sheetNames.length]; - for (int i = 0; i < sheetNames.length; i++) { - String sheetName = sheetNames[i]; - oss[i] = new OrderedSheet(sheetName, _masterBook.getSheetIndex(sheetName)); - } - for (int i = 0; i < oss.length; i++) { - String sheetName = oss[i].getSheetName(); + String[] sheetNames = new String[_sharedSheetsByName.size()]; + _sharedSheetsByName.keySet().toArray(sheetNames); + for (String sheetName : sheetNames) { ForkedEvaluationSheet sheet = _sharedSheetsByName.get(sheetName); sheet.copyUpdatedCells(workbook.getSheet(sheetName)); } @@ -144,20 +136,4 @@ final class ForkedEvaluationWorkbook implements EvaluationWorkbook { public UDFFinder getUDFFinder(){ return _masterBook.getUDFFinder(); } - - private static final class OrderedSheet implements Comparable<OrderedSheet> { - private final String _sheetName; - private final int _index; - - public OrderedSheet(String sheetName, int index) { - _sheetName = sheetName; - _index = index; - } - public String getSheetName() { - return _sheetName; - } - public int compareTo(OrderedSheet o) { - return _index - o._index; - } - } } |