From 6a6aa540eb76376ee836e452648d8af7f7bfdc63 Mon Sep 17 00:00:00 2001 From: Andreas Beeker Date: Sun, 12 Jun 2016 00:54:01 +0000 Subject: [PATCH] revert back to changes of bug 57840 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1747945 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/poi/xssf/usermodel/XSSFRow.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java index 5c8b385b76..13b15bf28c 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java @@ -72,7 +72,7 @@ public class XSSFRow implements Row, Comparable { _cells = new TreeMap(); for (CTCell c : row.getCArray()) { XSSFCell cell = new XSSFCell(this, c); - _cells.put(cell.getColumnIndex(), cell); + _cells.put(new Integer(cell.getColumnIndex()), cell); sheet.onReadCell(cell); } } @@ -198,7 +198,7 @@ public class XSSFRow implements Row, Comparable { */ public XSSFCell createCell(int columnIndex, int type) { CTCell ctCell; - XSSFCell prev = _cells.get(columnIndex); + XSSFCell prev = _cells.get(new Integer(columnIndex)); if(prev != null){ ctCell = prev.getCTCell(); ctCell.set(CTCell.Factory.newInstance()); @@ -210,7 +210,7 @@ public class XSSFRow implements Row, Comparable { if (type != Cell.CELL_TYPE_BLANK) { xcell.setCellType(type); } - _cells.put(columnIndex, xcell); + _cells.put(new Integer(columnIndex), xcell); return xcell; } @@ -236,7 +236,7 @@ public class XSSFRow implements Row, Comparable { public XSSFCell getCell(int cellnum, MissingCellPolicy policy) { if(cellnum < 0) throw new IllegalArgumentException("Cell index must be >= 0"); - XSSFCell cell = _cells.get(cellnum); + XSSFCell cell = _cells.get(new Integer(cellnum)); if(policy == RETURN_NULL_AND_BLANK) { return cell; } @@ -455,7 +455,7 @@ public class XSSFRow implements Row, Comparable { if(cell.getCellType() == Cell.CELL_TYPE_FORMULA) { _sheet.getWorkbook().onDeleteFormula(xcell); } - _cells.remove(cell.getColumnIndex()); + _cells.remove(new Integer(cell.getColumnIndex())); } /** -- 2.39.5