diff --git a/src/java/org/apache/poi/extractor/ExtractorFactory.java b/src/java/org/apache/poi/extractor/ExtractorFactory.java index a908a73085..0833535189 100644 --- a/src/java/org/apache/poi/extractor/ExtractorFactory.java +++ b/src/java/org/apache/poi/extractor/ExtractorFactory.java @@ -307,8 +307,10 @@ public final class ExtractorFactory { } } } - throw new IOException("Your InputStream was neither an OLE2 stream, nor an OOXML stream " + - "or you haven't provide the poi-ooxml*.jar and/or poi-scratchpad*.jar in the classpath/modulepath - FileMagic: "+fm); + throw new IOException( + "Your InputStream was neither an OLE2 stream, nor an OOXML stream " + + "or you haven't provide the poi-ooxml*.jar and/or poi-scratchpad*.jar in the classpath/modulepath - FileMagic: " + fm + + ", providers: " + Singleton.INSTANCE.provider); } public static void addProvider(ExtractorProvider provider){ diff --git a/src/java/org/apache/poi/ss/usermodel/WorkbookFactory.java b/src/java/org/apache/poi/ss/usermodel/WorkbookFactory.java index c0f376f65f..b730731f7c 100644 --- a/src/java/org/apache/poi/ss/usermodel/WorkbookFactory.java +++ b/src/java/org/apache/poi/ss/usermodel/WorkbookFactory.java @@ -296,7 +296,8 @@ public final class WorkbookFactory { } } throw new IOException("Your InputStream was neither an OLE2 stream, nor an OOXML stream " + - "or you haven't provide the poi-ooxml*.jar in the classpath/modulepath - FileMagic: "+fm); + "or you haven't provide the poi-ooxml*.jar in the classpath/modulepath - FileMagic: " + fm + + ", having providers: " + Singleton.INSTANCE.provider); } public static void addProvider(WorkbookProvider provider){ diff --git a/src/ooxml/testcases/org/apache/poi/poifs/crypt/tests/TestHxxFEncryption.java b/src/ooxml/testcases/org/apache/poi/poifs/crypt/tests/TestHxxFEncryption.java index 393186e68d..a687045645 100644 --- a/src/ooxml/testcases/org/apache/poi/poifs/crypt/tests/TestHxxFEncryption.java +++ b/src/ooxml/testcases/org/apache/poi/poifs/crypt/tests/TestHxxFEncryption.java @@ -49,7 +49,7 @@ import org.junit.runners.Parameterized.Parameters; @RunWith(Parameterized.class) public class TestHxxFEncryption { - @Parameter(value = 0) + @Parameter public POIDataSamples sampleDir; @Parameter(value = 1) diff --git a/src/ooxml/testcases/org/apache/poi/xssf/model/TestThemesTable.java b/src/ooxml/testcases/org/apache/poi/xssf/model/TestThemesTable.java index 2642fb0074..81bb44b90e 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/model/TestThemesTable.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/model/TestThemesTable.java @@ -45,12 +45,14 @@ import org.junit.Test; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor; public class TestThemesTable { - private final String testFileSimple = "Themes.xlsx"; - private final String testFileComplex = "Themes2.xlsx"; - // TODO .xls version available too, add HSSF support then check + private static final String testFileComplex = "Themes2.xlsx"; + // TODO .xls version available too, add HSSF support then check + + // For offline testing + private static final boolean createFiles = false; // What colours they should show up as - private static String[] rgbExpected = { + private static final String[] rgbExpected = { "ffffff", // Lt1 "000000", // Dk1 "eeece1", // Lt2 @@ -68,6 +70,7 @@ public class TestThemesTable { @Test public void testThemesTableColors() throws Exception { // Load our two test workbooks + String testFileSimple = "Themes.xlsx"; XSSFWorkbook simple = XSSFTestDataSamples.openSampleWorkbook(testFileSimple); XSSFWorkbook complex = XSSFTestDataSamples.openSampleWorkbook(testFileComplex); // Save and re-load them, to check for stability across that @@ -84,13 +87,10 @@ public class TestThemesTable { workbooks.put("Re-Saved_" + testFileSimple, simpleRS); workbooks.put(testFileComplex, complex); workbooks.put("Re-Saved_" + testFileComplex, complexRS); - + // Sanity check - assertEquals(rgbExpected.length, rgbExpected.length); - - // For offline testing - boolean createFiles = false; - + assertEquals(12, rgbExpected.length); + // Check each workbook in turn, and verify that the colours // for the theme-applied cells in Column A are correct for (String whatWorkbook : workbooks.keySet()) { @@ -98,7 +98,7 @@ public class TestThemesTable { XSSFSheet sheet = workbook.getSheetAt(0); int startRN = 0; if (whatWorkbook.endsWith(testFileComplex)) startRN++; - + for (int rn=startRN; rn