From: Javen O'Neal Date: Thu, 16 Feb 2017 06:15:13 +0000 (+0000) Subject: OLD_FILES, EXPECTED_FAILURES, and IGNORED do not need to be modified when executing... X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0443c27edee3b31b36a3a82bcd535a8151733251;p=poi.git OLD_FILES, EXPECTED_FAILURES, and IGNORED do not need to be modified when executing TestAllFiles git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1783174 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/integrationtest/org/apache/poi/TestAllFiles.java b/src/integrationtest/org/apache/poi/TestAllFiles.java index c11d41500e..af30e69efd 100644 --- a/src/integrationtest/org/apache/poi/TestAllFiles.java +++ b/src/integrationtest/org/apache/poi/TestAllFiles.java @@ -177,12 +177,15 @@ public class TestAllFiles { HANDLERS.put("spreadsheet/test_properties1", new NullFileHandler()); } + private static final Set unmodifiableHashSet(String... a) { + return Collections.unmodifiableSet(hashSet(a)); + } private static final Set hashSet(String... a) { return new HashSet(Arrays.asList(a)); } // Old Word Documents where we can at least extract some text - private static final Set OLD_FILES = hashSet( + private static final Set OLD_FILES = unmodifiableHashSet( "document/Bug49933.doc", "document/Bug51944.doc", "document/Word6.doc", @@ -194,7 +197,7 @@ public class TestAllFiles { "document/52117.doc" ); - private static final Set EXPECTED_FAILURES = hashSet( + private static final Set EXPECTED_FAILURES = unmodifiableHashSet( // password protected files "spreadsheet/password.xls", "spreadsheet/protected_passtika.xlsx", @@ -284,7 +287,7 @@ public class TestAllFiles { "spreadsheet/ConditionalFormattingSamples.xls" ); - private static final Set IGNORED = hashSet( + private static final Set IGNORED = unmodifiableHashSet( // need JDK8+ - https://bugs.openjdk.java.net/browse/JDK-8038081 "slideshow/42474-2.ppt", // OPC handler works / XSSF handler fails