aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2017-09-16 08:28:56 +0000
committerDominik Stadler <centic@apache.org>2017-09-16 08:28:56 +0000
commit7c01f5a50cbd2506a02f58ee0189e906a80fef11 (patch)
tree5570a442b9fbe47ae727a07f7427b5f436cbd8f5 /src
parentac0f7b46f21bebb983256495c08f2a393ac1ea95 (diff)
downloadpoi-7c01f5a50cbd2506a02f58ee0189e906a80fef11.tar.gz
poi-7c01f5a50cbd2506a02f58ee0189e906a80fef11.zip
Use Collections.singleton() where applicable
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808520 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java3
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFIgnoredErrorHelper.java4
2 files changed, 3 insertions, 4 deletions
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
index 6dea9a792d..ccac2cc474 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
@@ -25,7 +25,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
@@ -3316,7 +3315,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
String ref = address.formatAsString();
CTSelection ctsel = getSheetTypeSelection();
ctsel.setActiveCell(ref);
- ctsel.setSqref(Arrays.asList(ref));
+ ctsel.setSqref(Collections.singletonList(ref));
}
/**
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFIgnoredErrorHelper.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFIgnoredErrorHelper.java
index 61ea8d291a..2fd4218ca6 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFIgnoredErrorHelper.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFIgnoredErrorHelper.java
@@ -17,7 +17,7 @@
package org.apache.poi.xssf.usermodel.helpers;
-import java.util.Arrays;
+import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;
@@ -88,7 +88,7 @@ public class XSSFIgnoredErrorHelper {
}
public static void addIgnoredErrors(CTIgnoredError err, String ref, IgnoredErrorType... ignoredErrorTypes) {
- err.setSqref(Arrays.asList(ref));
+ err.setSqref(Collections.singletonList(ref));
for (IgnoredErrorType errType : ignoredErrorTypes) {
XSSFIgnoredErrorHelper.set(errType, err);
}