]> source.dussan.org Git - poi.git/commitdiff
Use Collections.singleton() where applicable
authorDominik Stadler <centic@apache.org>
Sat, 16 Sep 2017 08:28:56 +0000 (08:28 +0000)
committerDominik Stadler <centic@apache.org>
Sat, 16 Sep 2017 08:28:56 +0000 (08:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808520 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFIgnoredErrorHelper.java

index 6dea9a792d25e241dd30503248ef2d4fb5074c3d..ccac2cc4744c43799bf6213c5651b65b84d00d29 100644 (file)
@@ -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));
     }
 
     /**
index 61ea8d291afb14469051f7279cf46cb19909b0c1..2fd4218ca65cdc642a93de958a38897429db5aa8 100644 (file)
@@ -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);
         }