aboutsummaryrefslogtreecommitdiffstats
path: root/poi-ooxml
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2022-12-12 18:14:49 +0000
committerPJ Fanning <fanningpj@apache.org>2022-12-12 18:14:49 +0000
commit1b4e8ba77ba7a09978370c3864c5b4436788981d (patch)
tree850bb7f953b2e0a198f284138c83e32d243dd2fd /poi-ooxml
parent7454a722f0d408afc605cb1b3cbb2daa9c5c913c (diff)
downloadpoi-1b4e8ba77ba7a09978370c3864c5b4436788981d.tar.gz
poi-1b4e8ba77ba7a09978370c3864c5b4436788981d.zip
remove unnecessary short casts for getCellStyleAt
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1905938 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml')
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java2
-rw-r--r--poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java2
-rw-r--r--poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
index 081adc516a..7dec278354 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
@@ -989,7 +989,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet, OoxmlSheetEx
@Override
public CellStyle getColumnStyle(int column) {
int idx = columnHelper.getColDefaultStyle(column);
- return getWorkbook().getCellStyleAt((short)(idx == -1 ? 0 : idx));
+ return getWorkbook().getCellStyleAt(idx == -1 ? 0 : idx);
}
/**
diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
index 8a2802f1b9..f700d98a93 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
@@ -1094,7 +1094,7 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
try (XSSFWorkbook wb = new XSSFWorkbook()) {
XSSFSheet s = wb.createSheet();
- CellStyle defaultStyle = wb.getCellStyleAt((short) 0);
+ CellStyle defaultStyle = wb.getCellStyleAt(0);
assertEquals(0, defaultStyle.getIndex());
CellStyle blueStyle = wb.createCellStyle();
diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java
index b21ff6ec4a..9a48429f0b 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java
@@ -597,7 +597,7 @@ class TestXSSFCellStyle {
assertEquals(1, wb.getNumCellStyles());
assertEquals(2, styles.getFills().size());
- XSSFCellStyle defaultStyle = wb.getCellStyleAt((short)0);
+ XSSFCellStyle defaultStyle = wb.getCellStyleAt(0);
assertEquals(IndexedColors.AUTOMATIC.getIndex(), defaultStyle.getFillForegroundColor());
assertNull(defaultStyle.getFillForegroundXSSFColor());
assertEquals(FillPatternType.NO_FILL, defaultStyle.getFillPattern());