From 611f5273fdc6a2105a3239fc337b6500af6026ba Mon Sep 17 00:00:00 2001 From: Andreas Beeker Date: Mon, 18 Oct 2021 17:40:47 +0000 Subject: sonar fixes git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894360 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/stress/AbstractFileHandler.java | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'poi-integration') diff --git a/poi-integration/src/test/java/org/apache/poi/stress/AbstractFileHandler.java b/poi-integration/src/test/java/org/apache/poi/stress/AbstractFileHandler.java index 2177af2b6f..fec396281d 100644 --- a/poi-integration/src/test/java/org/apache/poi/stress/AbstractFileHandler.java +++ b/poi-integration/src/test/java/org/apache/poi/stress/AbstractFileHandler.java @@ -25,6 +25,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; +import java.util.Arrays; import java.util.HashSet; import java.util.Set; @@ -43,23 +44,22 @@ import org.apache.poi.util.IOUtils; * in the integration tests, mostly text-extraction related at the moment. */ public abstract class AbstractFileHandler implements FileHandler { - public static final Set EXPECTED_EXTRACTOR_FAILURES = new HashSet<>(); - static { + public static final Set EXPECTED_EXTRACTOR_FAILURES = new HashSet<>(Arrays.asList( // password protected files without password // ... currently none ... // unsupported file-types, no supported OLE2 parts - EXPECTED_EXTRACTOR_FAILURES.add("hmef/quick-winmail.dat"); - EXPECTED_EXTRACTOR_FAILURES.add("hmef/winmail-sample1.dat"); - EXPECTED_EXTRACTOR_FAILURES.add("hmef/bug52400-winmail-simple.dat"); - EXPECTED_EXTRACTOR_FAILURES.add("hmef/bug52400-winmail-with-attachments.dat"); - EXPECTED_EXTRACTOR_FAILURES.add("hmef/bug63955-winmail.dat"); - EXPECTED_EXTRACTOR_FAILURES.add("hpsf/Test0313rur.adm"); - EXPECTED_EXTRACTOR_FAILURES.add("poifs/Notes.ole2"); - EXPECTED_EXTRACTOR_FAILURES.add("poifs/64322.ole2"); + "hmef/quick-winmail.dat", + "hmef/winmail-sample1.dat", + "hmef/bug52400-winmail-simple.dat", + "hmef/bug52400-winmail-with-attachments.dat", + "hmef/bug63955-winmail.dat", + "hpsf/Test0313rur.adm", + "poifs/Notes.ole2", + "poifs/64322.ole2", //commons-compress 1.21 no longer supports truncated files - EXPECTED_EXTRACTOR_FAILURES.add("document/truncated62886.docx"); - } + "document/truncated62886.docx" + )); @Override public void handleExtracting(File file) throws Exception { -- cgit v1.2.3