diff options
author | PJ Fanning <fanningpj@apache.org> | 2021-10-03 22:04:05 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2021-10-03 22:04:05 +0000 |
commit | defa6de0fdc6c6fdc99b52a900726a817be6005c (patch) | |
tree | d0dcac1d9e5dc8fd25613caaa3695c9e9bd80951 | |
parent | b2f0d5fc5a3a15b1676d45705429b4a79b8c564e (diff) | |
download | poi-defa6de0fdc6c6fdc99b52a900726a817be6005c.tar.gz poi-defa6de0fdc6c6fdc99b52a900726a817be6005c.zip |
make array into immutable collection (spotbugs issue)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1893863 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java index b78145d6aa..a8bc2ca678 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java @@ -17,8 +17,7 @@ package org.apache.poi.xssf.extractor; import java.io.IOException; -import java.util.Iterator; -import java.util.Locale; +import java.util.*; import org.apache.poi.hssf.extractor.ExcelExtractor; import org.apache.poi.ooxml.extractor.POIXMLTextExtractor; @@ -46,11 +45,13 @@ import org.apache.xmlbeans.XmlException; */ public class XSSFExcelExtractor implements POIXMLTextExtractor, org.apache.poi.ss.extractor.ExcelExtractor { - public static final XSSFRelation[] SUPPORTED_TYPES = new XSSFRelation[] { - XSSFRelation.WORKBOOK, XSSFRelation.MACRO_TEMPLATE_WORKBOOK, - XSSFRelation.MACRO_ADDIN_WORKBOOK, XSSFRelation.TEMPLATE_WORKBOOK, - XSSFRelation.MACROS_WORKBOOK - }; + public static final List<XSSFRelation> SUPPORTED_TYPES = Collections.unmodifiableList( + Arrays.asList( + XSSFRelation.WORKBOOK, XSSFRelation.MACRO_TEMPLATE_WORKBOOK, + XSSFRelation.MACRO_ADDIN_WORKBOOK, XSSFRelation.TEMPLATE_WORKBOOK, + XSSFRelation.MACROS_WORKBOOK + ) + ); private Locale locale; private final XSSFWorkbook workbook; |