Use Collections.singleton() where applicable
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808520 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
356d4a77cb
commit
b7547a01f6
@ -25,7 +25,6 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
@ -3316,7 +3315,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
|
|||||||
String ref = address.formatAsString();
|
String ref = address.formatAsString();
|
||||||
CTSelection ctsel = getSheetTypeSelection();
|
CTSelection ctsel = getSheetTypeSelection();
|
||||||
ctsel.setActiveCell(ref);
|
ctsel.setActiveCell(ref);
|
||||||
ctsel.setSqref(Arrays.asList(ref));
|
ctsel.setSqref(Collections.singletonList(ref));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
package org.apache.poi.xssf.usermodel.helpers;
|
package org.apache.poi.xssf.usermodel.helpers;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Collections;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ public class XSSFIgnoredErrorHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void addIgnoredErrors(CTIgnoredError err, String ref, IgnoredErrorType... ignoredErrorTypes) {
|
public static void addIgnoredErrors(CTIgnoredError err, String ref, IgnoredErrorType... ignoredErrorTypes) {
|
||||||
err.setSqref(Arrays.asList(ref));
|
err.setSqref(Collections.singletonList(ref));
|
||||||
for (IgnoredErrorType errType : ignoredErrorTypes) {
|
for (IgnoredErrorType errType : ignoredErrorTypes) {
|
||||||
XSSFIgnoredErrorHelper.set(errType, err);
|
XSSFIgnoredErrorHelper.set(errType, err);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user