diff --git a/src/multimodule/scratchpad/test9/module-info.class b/src/multimodule/scratchpad/test9/module-info.class index 2bc8390055..23510c2080 100644 Binary files a/src/multimodule/scratchpad/test9/module-info.class and b/src/multimodule/scratchpad/test9/module-info.class differ diff --git a/src/multimodule/scratchpad/test9/module-info.java b/src/multimodule/scratchpad/test9/module-info.java index e3472062ea..67fee95b8b 100644 --- a/src/multimodule/scratchpad/test9/module-info.java +++ b/src/multimodule/scratchpad/test9/module-info.java @@ -85,6 +85,59 @@ module org.apache.poi.scratchpad { exports org.apache.poi.hwmf to org.junit.platform.commons; exports org.apache.poi.hwpf.util to org.junit.platform.commons; - opens org.apache.poi.hwpf.model to org.mockito; - opens org.apache.poi.hwpf.model.types to org.mockito; + opens org.apache.poi.hwpf.model to org.mockito, org.junit.platform.commons; + opens org.apache.poi.hwpf.model.types to org.mockito, org.junit.platform.commons; + + opens org.apache.poi.hmef to org.junit.platform.commons; + opens org.apache.poi.hmef.dev to org.junit.platform.commons; + opens org.apache.poi.hmef.extractor to org.junit.platform.commons; + opens org.apache.poi.hmef.attribute to org.junit.platform.commons; + opens org.apache.poi.hdgf to org.junit.platform.commons; + opens org.apache.poi.hdgf.dev to org.junit.platform.commons; + opens org.apache.poi.hdgf.streams to org.junit.platform.commons; + opens org.apache.poi.hdgf.extractor to org.junit.platform.commons; + opens org.apache.poi.hdgf.pointers to org.junit.platform.commons; + opens org.apache.poi.hdgf.exceptions to org.junit.platform.commons; + opens org.apache.poi.hdgf.chunks to org.junit.platform.commons; + opens org.apache.poi.hwpf to org.junit.platform.commons; + opens org.apache.poi.hwpf.dev to org.junit.platform.commons; + opens org.apache.poi.hwpf.sprm to org.junit.platform.commons; + opens org.apache.poi.hwpf.converter to org.junit.platform.commons; + opens org.apache.poi.hwpf.extractor to org.junit.platform.commons; + opens org.apache.poi.hwpf.usermodel to org.junit.platform.commons; + opens org.apache.poi.hwpf.model.io to org.junit.platform.commons; + opens org.apache.poi.hwpf.util to org.junit.platform.commons; + opens org.apache.poi.hwmf to org.junit.platform.commons; + opens org.apache.poi.hwmf.record to org.junit.platform.commons; + opens org.apache.poi.hwmf.draw to org.junit.platform.commons; + opens org.apache.poi.hwmf.usermodel to org.junit.platform.commons; + opens org.apache.poi.extractor.ole2 to org.junit.platform.commons; + opens org.apache.poi.hpbf to org.junit.platform.commons; + opens org.apache.poi.hpbf.dev to org.junit.platform.commons; + opens org.apache.poi.hpbf.extractor to org.junit.platform.commons; + opens org.apache.poi.hpbf.model to org.junit.platform.commons; + opens org.apache.poi.hpbf.model.qcbits to org.junit.platform.commons; + opens org.apache.poi.hslf to org.junit.platform.commons; + opens org.apache.poi.hslf.dev to org.junit.platform.commons; + opens org.apache.poi.hslf.record to org.junit.platform.commons; + opens org.apache.poi.hslf.extractor to org.junit.platform.commons; + opens org.apache.poi.hslf.exceptions to org.junit.platform.commons; + opens org.apache.poi.hslf.usermodel to org.junit.platform.commons; + opens org.apache.poi.hslf.blip to org.junit.platform.commons; + opens org.apache.poi.hslf.model to org.junit.platform.commons; + opens org.apache.poi.hslf.model.textproperties to org.junit.platform.commons; + opens org.apache.poi.hslf.util to org.junit.platform.commons; + opens org.apache.poi.hssf.converter to org.junit.platform.commons; + opens org.apache.poi.hsmf to org.junit.platform.commons; + opens org.apache.poi.hsmf.dev to org.junit.platform.commons; + opens org.apache.poi.hsmf.datatypes to org.junit.platform.commons; + opens org.apache.poi.hsmf.extractor to org.junit.platform.commons; + opens org.apache.poi.hsmf.exceptions to org.junit.platform.commons; + opens org.apache.poi.hsmf.parsers to org.junit.platform.commons; + opens org.apache.poi.hemf.record.emf to org.junit.platform.commons; + opens org.apache.poi.hemf.record.emfplus to org.junit.platform.commons; + opens org.apache.poi.hemf.hemfplus.extractor to org.junit.platform.commons; + opens org.apache.poi.hemf.draw to org.junit.platform.commons; + opens org.apache.poi.hemf.usermodel to org.junit.platform.commons; + } \ No newline at end of file diff --git a/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java b/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java index 8b69548f46..8c5f3e9b88 100644 --- a/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java +++ b/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java @@ -47,12 +47,12 @@ public final class TestHDGFCore { } @Test - public void testCreate() throws Exception { + void testCreate() throws Exception { hdgf = new HDGFDiagram(fs); } @Test - public void testTrailer() throws Exception { + void testTrailer() throws Exception { hdgf = new HDGFDiagram(fs); assertNotNull(hdgf); assertNotNull(hdgf.getTrailerStream()); @@ -80,7 +80,7 @@ public final class TestHDGFCore { * break with a negative chunk length */ @Test - public void testNegativeChunkLength() throws Exception { + void testNegativeChunkLength() throws Exception { fs = new POIFSFileSystem(_dgTests.openResourceAsStream("NegativeChunkLength.vsd")); hdgf = new HDGFDiagram(fs); @@ -106,7 +106,7 @@ public final class TestHDGFCore { } @Test - public void testV5() throws Exception { + void testV5() throws Exception { fs = new POIFSFileSystem(_dgTests.openResourceAsStream("v5_Connection_Types.vsd")); hdgf = new HDGFDiagram(fs); @@ -119,7 +119,7 @@ public final class TestHDGFCore { } @Test - public void testV6NonUtf16LE() throws Exception { + void testV6NonUtf16LE() throws Exception { fs = new POIFSFileSystem(_dgTests.openResourceAsStream("v6-non-utf16le.vsd")); hdgf = new HDGFDiagram(fs); @@ -132,7 +132,7 @@ public final class TestHDGFCore { } @Test - public void testUtf16LE() throws Exception { + void testUtf16LE() throws Exception { fs = new POIFSFileSystem(_dgTests.openResourceAsStream("Test_Visio-Some_Random_Text.vsd")); hdgf = new HDGFDiagram(fs); diff --git a/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFLZW.java b/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFLZW.java index 6d70771657..86163afe33 100644 --- a/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFLZW.java +++ b/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFLZW.java @@ -113,7 +113,7 @@ public final class TestHDGFLZW { }; @Test - public void testCounts() throws Exception { + void testCounts() throws Exception { assertEquals(339, testTrailerComp.length); assertEquals(632, testTrailerDecomp.length); @@ -134,7 +134,7 @@ public final class TestHDGFLZW { } @Test - public void testDecompress() throws Exception { + void testDecompress() throws Exception { assertEquals(339, testTrailerComp.length); assertEquals(632, testTrailerDecomp.length); @@ -152,7 +152,7 @@ public final class TestHDGFLZW { * on the best way to compress it */ @Test - public void testCompressMini() throws Exception { + void testCompressMini() throws Exception { // first 11 bytes compressed = 12 bytes uncompressed byte[] sourceDecomp = Arrays.copyOf(testTrailerDecomp, 12); @@ -176,7 +176,7 @@ public final class TestHDGFLZW { * Tests that we can do several mask pages */ @Test - public void testCompressMidi() throws Exception { + void testCompressMidi() throws Exception { // First 12 -> 11 // Next 32 -> 13 byte[] sourceDecomp = Arrays.copyOf(testTrailerDecomp, 44); @@ -196,7 +196,7 @@ public final class TestHDGFLZW { } @Test - public void testCompressFull() throws Exception { + void testCompressFull() throws Exception { assertEquals(339, testTrailerComp.length); assertEquals(632, testTrailerDecomp.length); diff --git a/src/scratchpad/testcases/org/apache/poi/hdgf/chunks/TestChunks.java b/src/scratchpad/testcases/org/apache/poi/hdgf/chunks/TestChunks.java index a187fadf42..3b97b03b50 100644 --- a/src/scratchpad/testcases/org/apache/poi/hdgf/chunks/TestChunks.java +++ b/src/scratchpad/testcases/org/apache/poi/hdgf/chunks/TestChunks.java @@ -45,7 +45,7 @@ public final class TestChunks { } @Test - public void testChunkHeaderA() { + void testChunkHeaderA() { ChunkHeader h = ChunkHeader.createChunkHeader(11, data_a, 0); assertTrue(h instanceof ChunkHeaderV11); @@ -63,7 +63,7 @@ public final class TestChunks { } @Test - public void testChunkHeaderB() { + void testChunkHeaderB() { ChunkHeader h = ChunkHeader.createChunkHeader(11, data_b, 0); assertTrue(h instanceof ChunkHeaderV11); @@ -81,7 +81,7 @@ public final class TestChunks { } @Test - public void testOneChunk() throws Exception { + void testOneChunk() throws Exception { ChunkFactory cf = new ChunkFactory(11); cf.createChunk(data_a, 0); cf.createChunk(data_b, 0); @@ -114,7 +114,7 @@ public final class TestChunks { } @Test - public void testAnotherChunk() throws Exception { + void testAnotherChunk() throws Exception { ChunkFactory cf = new ChunkFactory(11); // Go for the 2nd chunk in the stream @@ -151,7 +151,7 @@ public final class TestChunks { } @Test - public void testManyChunks() throws Exception { + void testManyChunks() throws Exception { ChunkFactory cf = new ChunkFactory(11); Chunk chunk; int offset = 0; diff --git a/src/scratchpad/testcases/org/apache/poi/hdgf/extractor/TestVisioExtractor.java b/src/scratchpad/testcases/org/apache/poi/hdgf/extractor/TestVisioExtractor.java index 18b5e16eb9..5ee7bc9009 100644 --- a/src/scratchpad/testcases/org/apache/poi/hdgf/extractor/TestVisioExtractor.java +++ b/src/scratchpad/testcases/org/apache/poi/hdgf/extractor/TestVisioExtractor.java @@ -38,7 +38,7 @@ public final class TestVisioExtractor { * Test the 3 different ways of creating one */ @Test - public void testCreation() throws IOException { + void testCreation() throws IOException { VisioTextExtractor extractor1 = openExtractor(defFilename); assertNotNull(extractor1); assertNotNull(extractor1.getAllText()); @@ -71,7 +71,7 @@ public final class TestVisioExtractor { } @Test - public void testExtraction() throws Exception { + void testExtraction() throws Exception { VisioTextExtractor extractor = openExtractor(defFilename); // Check the array fetch @@ -92,7 +92,7 @@ public final class TestVisioExtractor { } @Test - public void testProblemFiles() throws Exception { + void testProblemFiles() throws Exception { String[] files = { "44594.vsd", "44594-2.vsd", "ShortChunk1.vsd", "ShortChunk2.vsd", "ShortChunk3.vsd", diff --git a/src/scratchpad/testcases/org/apache/poi/hdgf/pointers/TestPointerFactory.java b/src/scratchpad/testcases/org/apache/poi/hdgf/pointers/TestPointerFactory.java index 0e2972d6dc..3beedf60c0 100644 --- a/src/scratchpad/testcases/org/apache/poi/hdgf/pointers/TestPointerFactory.java +++ b/src/scratchpad/testcases/org/apache/poi/hdgf/pointers/TestPointerFactory.java @@ -52,13 +52,13 @@ public final class TestPointerFactory { }; @Test - public void testCreateV4() { + void testCreateV4() { PointerFactory pf = new PointerFactory(4); assertThrows(IllegalArgumentException.class, () -> pf.createPointer(new byte[]{}, 0)); } @Test - public void testCreateV5() { + void testCreateV5() { PointerFactory pf = new PointerFactory(5); Pointer a = pf.createPointer(vp5_a, 0); @@ -78,7 +78,7 @@ public final class TestPointerFactory { } @Test - public void testCreateV6() { + void testCreateV6() { PointerFactory pf = new PointerFactory(6); Pointer a = pf.createPointer(vp6_a, 0); @@ -135,7 +135,7 @@ public final class TestPointerFactory { } @Test - public void testCreateV6FromMid() { + void testCreateV6FromMid() { PointerFactory pf = new PointerFactory(11); // Create a from part way down the byte stream diff --git a/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBasics.java b/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBasics.java index 9e1df7aec7..847eaa05d1 100644 --- a/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBasics.java +++ b/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBasics.java @@ -56,7 +56,7 @@ public final class TestStreamBasics extends StreamTest { @Test - public void testCompressedStream() { + void testCompressedStream() { // Create a fake pointer Pointer ptr = new TestPointer(true, 0, compressedStream.length, -1, (short)-1); // Now the stream @@ -80,7 +80,7 @@ public final class TestStreamBasics extends StreamTest { } @Test - public void testUncompressedStream() { + void testUncompressedStream() { // Create a fake pointer Pointer ptr = new TestPointer(false, 0, uncompressedStream.length, -1, (short)-1); // Now the stream diff --git a/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java b/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java index f2a9579f8a..ea4e8b3c34 100644 --- a/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java +++ b/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java @@ -55,7 +55,7 @@ public final class TestStreamBugs extends StreamTest { } @Test - public void testGetTrailer() { + void testGetTrailer() { Pointer trailerPointer = ptrFactory.createPointer(contents, 0x24); Stream.createStream(trailerPointer, contents, chunkFactory, ptrFactory); } @@ -67,7 +67,7 @@ public final class TestStreamBugs extends StreamTest { } @Test - public void testGetChildren() { + void testGetChildren() { Pointer trailerPointer = ptrFactory.createPointer(contents, 0x24); TrailerStream trailer = (TrailerStream) Stream.createStream(trailerPointer, contents, chunkFactory, ptrFactory); @@ -103,7 +103,7 @@ public final class TestStreamBugs extends StreamTest { } @Test - public void testOpen() throws IOException { + void testOpen() throws IOException { new HDGFDiagram(filesystem).close(); } } diff --git a/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java b/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java index 19ec45d0cc..798fffd6ad 100644 --- a/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java +++ b/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java @@ -64,7 +64,7 @@ public final class TestStreamComplex extends StreamTest { * Test creating the trailer, but not looking for children */ @Test - public void testTrailer() { + void testTrailer() { // Find the trailer Pointer trailerPtr = ptrFactory.createPointer(contents, trailerPointerAt); @@ -86,7 +86,7 @@ public final class TestStreamComplex extends StreamTest { } @Test - public void testChunks() { + void testChunks() { Pointer trailerPtr = ptrFactory.createPointer(contents, trailerPointerAt); TrailerStream ts = (TrailerStream) Stream.createStream(trailerPtr, contents, chunkFactory, ptrFactory); @@ -107,7 +107,7 @@ public final class TestStreamComplex extends StreamTest { } @Test - public void testStrings() { + void testStrings() { Pointer trailerPtr = ptrFactory.createPointer(contents, trailerPointerAt); TrailerStream ts = (TrailerStream) Stream.createStream(trailerPtr, contents, chunkFactory, ptrFactory); @@ -124,7 +124,7 @@ public final class TestStreamComplex extends StreamTest { } @Test - public void testPointerToStrings() { + void testPointerToStrings() { // The stream at 0x347f has strings // The stream at 0x4312 has a pointer to 0x347f // The stream at 0x44d3 has a pointer to 0x4312 @@ -169,7 +169,7 @@ public final class TestStreamComplex extends StreamTest { } @Test - public void testTrailerContents() { + void testTrailerContents() { Pointer trailerPtr = ptrFactory.createPointer(contents, trailerPointerAt); TrailerStream ts = (TrailerStream) Stream.createStream(trailerPtr, contents, chunkFactory, ptrFactory); @@ -221,7 +221,7 @@ public final class TestStreamComplex extends StreamTest { } @Test - public void testChunkWithText() { + void testChunkWithText() { // Parent ChunkStream is at 0x7194 // This is one of the last children of the trailer Pointer trailerPtr = ptrFactory.createPointer(contents, trailerPointerAt); diff --git a/src/scratchpad/testcases/org/apache/poi/hemf/hemfplus/extractor/TestHemfPlusExtractor.java b/src/scratchpad/testcases/org/apache/poi/hemf/hemfplus/extractor/TestHemfPlusExtractor.java index e15a06ab8c..af9a80c799 100644 --- a/src/scratchpad/testcases/org/apache/poi/hemf/hemfplus/extractor/TestHemfPlusExtractor.java +++ b/src/scratchpad/testcases/org/apache/poi/hemf/hemfplus/extractor/TestHemfPlusExtractor.java @@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test; public class TestHemfPlusExtractor { @Test - public void testBasic() throws Exception { + void testBasic() throws Exception { //test header EmfCommentDataPlus emfPlus = getCommentRecord("SimpleEMF_windows.emf", 0); List records = emfPlus.getRecords(); diff --git a/src/scratchpad/testcases/org/apache/poi/hemf/usermodel/TestHemfPicture.java b/src/scratchpad/testcases/org/apache/poi/hemf/usermodel/TestHemfPicture.java index b199c5ec05..2ce88b751b 100644 --- a/src/scratchpad/testcases/org/apache/poi/hemf/usermodel/TestHemfPicture.java +++ b/src/scratchpad/testcases/org/apache/poi/hemf/usermodel/TestHemfPicture.java @@ -123,7 +123,7 @@ public class TestHemfPicture { } */ @Test - public void testBasicWindows() throws Exception { + void testBasicWindows() throws Exception { try (InputStream is = ss_samples.openResourceAsStream("SimpleEMF_windows.emf")) { HemfPicture pic = new HemfPicture(is); HemfHeader header = pic.getHeader(); @@ -140,7 +140,7 @@ public class TestHemfPicture { } @Test - public void testBasicMac() throws Exception { + void testBasicMac() throws Exception { try (InputStream is = ss_samples.openResourceAsStream("SimpleEMF_mac.emf")) { HemfPicture pic = new HemfPicture(is); HemfHeader header = pic.getHeader(); @@ -176,7 +176,7 @@ public class TestHemfPicture { } @Test - public void testMacText() throws Exception { + void testMacText() throws Exception { try (InputStream is = ss_samples.openResourceAsStream("SimpleEMF_mac.emf")) { HemfPicture pic = new HemfPicture(is); @@ -208,7 +208,7 @@ public class TestHemfPicture { } @Test - public void testWMFInsideEMF() throws Exception { + void testWMFInsideEMF() throws Exception { byte[] wmfData = null; try (InputStream is = ss_samples.openResourceAsStream("63327.emf")) { @@ -237,7 +237,7 @@ public class TestHemfPicture { } @Test - public void testWindowsText() throws Exception { + void testWindowsText() throws Exception { try (InputStream is = ss_samples.openResourceAsStream("SimpleEMF_windows.emf")) { HemfPicture pic = new HemfPicture(is); double lastY = -1; @@ -276,7 +276,7 @@ public class TestHemfPicture { } @Test - public void testInfiniteLoopOnFile() throws Exception { + void testInfiniteLoopOnFile() throws Exception { try (InputStream is = ss_samples.openResourceAsStream("61294.emf")) { HemfPicture pic = new HemfPicture(is); assertThrows(RecordFormatException.class, () -> pic.forEach(r -> {})); @@ -284,7 +284,7 @@ public class TestHemfPicture { } @Test - public void testInfiniteLoopOnByteArray() throws Exception { + void testInfiniteLoopOnByteArray() throws Exception { try (InputStream is = ss_samples.openResourceAsStream("61294.emf")) { ByteArrayOutputStream bos = new ByteArrayOutputStream(); IOUtils.copy(is, bos); diff --git a/src/scratchpad/testcases/org/apache/poi/hmef/TestAttachments.java b/src/scratchpad/testcases/org/apache/poi/hmef/TestAttachments.java index c565d0b4d7..bdcc28df7d 100644 --- a/src/scratchpad/testcases/org/apache/poi/hmef/TestAttachments.java +++ b/src/scratchpad/testcases/org/apache/poi/hmef/TestAttachments.java @@ -43,7 +43,7 @@ public final class TestAttachments { * Check the file is as we expect */ @Test - public void testCounts() { + void testCounts() { // Should have 5 attachments assertEquals(5, quick.getAttachments().size()); } @@ -52,7 +52,7 @@ public final class TestAttachments { * Check some basic bits about the attachments */ @Test - public void testBasicAttachments() { + void testBasicAttachments() { List attachments = quick.getAttachments(); // Word first @@ -86,7 +86,7 @@ public final class TestAttachments { * the right values for key things */ @Test - public void testAttachmentDetails() { + void testAttachmentDetails() { List attachments = quick.getAttachments(); assertEquals(5, attachments.size()); @@ -108,7 +108,7 @@ public final class TestAttachments { * Ensure the attachment contents come back as they should do */ @Test - public void testAttachmentContents() throws Exception { + void testAttachmentContents() throws Exception { List attachments = quick.getAttachments(); assertContents("quick.doc", attachments.get(0)); diff --git a/src/scratchpad/testcases/org/apache/poi/hmef/TestBugs.java b/src/scratchpad/testcases/org/apache/poi/hmef/TestBugs.java index 69c52c3c97..ef138aea90 100644 --- a/src/scratchpad/testcases/org/apache/poi/hmef/TestBugs.java +++ b/src/scratchpad/testcases/org/apache/poi/hmef/TestBugs.java @@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test; public class TestBugs { @Test - public void test52400ReadSimpleTNEF() throws IOException { + void test52400ReadSimpleTNEF() throws IOException { HMEFMessage tnefDat = openSample("bug52400-winmail-simple.dat"); MAPIAttribute bodyHtml = tnefDat.getMessageMAPIAttribute(MAPIProperty.BODY_HTML); assertNotNull(bodyHtml); @@ -42,7 +42,7 @@ public class TestBugs { } @Test - public void test52400ReadAttachedTNEF() throws IOException { + void test52400ReadAttachedTNEF() throws IOException { HMEFMessage tnefDat = openSample("bug52400-winmail-with-attachments.dat"); MAPIAttribute bodyHtml = tnefDat.getMessageMAPIAttribute(MAPIProperty.BODY_HTML); assertNotNull(bodyHtml); diff --git a/src/scratchpad/testcases/org/apache/poi/hmef/TestCompressedRTF.java b/src/scratchpad/testcases/org/apache/poi/hmef/TestCompressedRTF.java index a4793a2839..3d0b3412f9 100644 --- a/src/scratchpad/testcases/org/apache/poi/hmef/TestCompressedRTF.java +++ b/src/scratchpad/testcases/org/apache/poi/hmef/TestCompressedRTF.java @@ -47,7 +47,7 @@ public final class TestCompressedRTF { * then decoding has no hope... */ @Test - public void testQuickBasics() throws Exception { + void testQuickBasics() throws Exception { HMEFMessage msg; try (InputStream is = _samples.openResourceAsStream("quick-winmail.dat")) { msg = new HMEFMessage(is); @@ -108,7 +108,7 @@ public final class TestCompressedRTF { * (1 flag byte + 8 codes) */ @Test - public void testFirstBlock() throws Exception { + void testFirstBlock() throws Exception { HMEFMessage msg; try (InputStream is = _samples.openResourceAsStream("quick-winmail.dat")) { msg = new HMEFMessage(is); @@ -136,7 +136,7 @@ public final class TestCompressedRTF { * (flag + 8 codes, flag + 8 codes) */ @Test - public void testFirstTwoBlocks() throws Exception { + void testFirstTwoBlocks() throws Exception { HMEFMessage msg; try (InputStream is = _samples.openResourceAsStream("quick-winmail.dat")) { msg = new HMEFMessage(is); @@ -163,7 +163,7 @@ public final class TestCompressedRTF { * TODO Fix what looks like a padding issue */ @Test - public void testFull() throws Exception { + void testFull() throws Exception { final HMEFMessage msg; try (InputStream is = _samples.openResourceAsStream("quick-winmail.dat")) { msg = new HMEFMessage(is); diff --git a/src/scratchpad/testcases/org/apache/poi/hmef/TestHMEFMessage.java b/src/scratchpad/testcases/org/apache/poi/hmef/TestHMEFMessage.java index f2542c48c1..d0359a6d2e 100644 --- a/src/scratchpad/testcases/org/apache/poi/hmef/TestHMEFMessage.java +++ b/src/scratchpad/testcases/org/apache/poi/hmef/TestHMEFMessage.java @@ -46,7 +46,7 @@ public final class TestHMEFMessage { private static final POIDataSamples _samples = POIDataSamples.getHMEFInstance(); @Test - public void testCounts() throws Exception { + void testCounts() throws Exception { HMEFMessage msg = openSample("quick-winmail.dat"); // Should have 4 attributes on the message @@ -72,7 +72,7 @@ public final class TestHMEFMessage { } @Test - public void testBasicMessageAttributes() throws Exception { + void testBasicMessageAttributes() throws Exception { HMEFMessage msg = openSample("quick-winmail.dat"); // Should have version, codepage, class and MAPI @@ -103,7 +103,7 @@ public final class TestHMEFMessage { } @Test - public void testBasicMessageMAPIAttributes() throws Exception { + void testBasicMessageMAPIAttributes() throws Exception { HMEFMessage msg = openSample("quick-winmail.dat"); assertEquals("This is a test message", msg.getSubject()); @@ -115,7 +115,7 @@ public final class TestHMEFMessage { * can be correctly extracted */ @Test - public void testMessageContents() throws Exception { + void testMessageContents() throws Exception { HMEFMessage msg = openSample("quick-winmail.dat"); // Firstly by byte @@ -135,7 +135,7 @@ public final class TestHMEFMessage { } @Test - public void testMessageSample1() throws Exception { + void testMessageSample1() throws Exception { HMEFMessage msg = openSample("winmail-sample1.dat"); // Firstly by byte @@ -157,7 +157,7 @@ public final class TestHMEFMessage { } @Test - public void testInvalidMessage() { + void testInvalidMessage() { InputStream str = new ByteArrayInputStream(new byte[4]); IllegalArgumentException ex = assertThrows( IllegalArgumentException.class, @@ -167,7 +167,7 @@ public final class TestHMEFMessage { } @Test - public void testNoData() throws Exception { + void testNoData() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); // Header @@ -184,7 +184,7 @@ public final class TestHMEFMessage { } @Test - public void testInvalidLevel() throws Exception { + void testInvalidLevel() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); // Header @@ -205,7 +205,7 @@ public final class TestHMEFMessage { } @Test - public void testCustomProperty() throws IOException { + void testCustomProperty() throws IOException { HMEFMessage msg = openSample("quick-winmail.dat"); // Should have non-standard properties with IDs 0xE28 and 0xE29 diff --git a/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java b/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java index 34bd7b2a18..276085bf3a 100644 --- a/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java +++ b/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java @@ -49,7 +49,7 @@ public final class TestMAPIAttributes { * Test counts */ @Test - public void testCounts() throws Exception { + void testCounts() throws Exception { // Message should have 54 assertEquals(54, quick.getMessageMAPIAttributes().size()); @@ -61,7 +61,7 @@ public final class TestMAPIAttributes { * Test various general ones */ @Test - public void testBasics() throws Exception { + void testBasics() throws Exception { // Try constructing two attributes byte[] data = new byte[]{ // Level one, id 36867, type 6 @@ -130,7 +130,7 @@ public final class TestMAPIAttributes { * Test String, Date and RTF ones */ @Test - public void testTyped() throws Exception { + void testTyped() throws Exception { MAPIAttribute attr; // String @@ -173,7 +173,7 @@ public final class TestMAPIAttributes { * Check common ones via helper accessors */ @Test - public void testCommon() throws Exception { + void testCommon() throws Exception { assertEquals("This is a test message", quick.getSubject()); assertEquals("quick.doc", quick.getAttachments().get(0).getLongFilename()); diff --git a/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestTNEFAttributes.java b/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestTNEFAttributes.java index 858abdfcea..b688eb2f7e 100644 --- a/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestTNEFAttributes.java +++ b/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestTNEFAttributes.java @@ -51,7 +51,7 @@ public final class TestTNEFAttributes { * Test counts */ @Test - public void testCounts() throws Exception { + void testCounts() throws Exception { // The message should have 4 attributes assertEquals(4, quick.getMessageAttributes().size()); @@ -65,7 +65,7 @@ public final class TestTNEFAttributes { * Test the basics */ @Test - public void testBasics() throws Exception { + void testBasics() throws Exception { // An int one assertEquals( 0x010000, @@ -128,7 +128,7 @@ public final class TestTNEFAttributes { * Test string based ones */ @Test - public void testString() throws Exception { + void testString() throws Exception { TNEFAttribute attr = quick.getAttachments().get(0).getAttribute( TNEFProperty.ID_ATTACHTITLE ); @@ -147,7 +147,7 @@ public final class TestTNEFAttributes { * Test date based ones */ @Test - public void testDate() throws Exception { + void testDate() throws Exception { TNEFAttribute attr = quick.getAttachments().get(0).getAttribute( TNEFProperty.ID_ATTACHMODIFYDATE ); @@ -176,7 +176,7 @@ public final class TestTNEFAttributes { * Test a bit of mapi */ @Test - public void testMAPI() throws Exception { + void testMAPI() throws Exception { // Message MAPI TNEFAttribute attr = quick.getMessageAttribute( TNEFProperty.ID_MAPIPROPERTIES @@ -211,7 +211,7 @@ public final class TestTNEFAttributes { * Test common ones via helpers */ @Test - public void testCommon() throws Exception { + void testCommon() throws Exception { assertEquals("This is a test message", quick.getSubject()); assertEquals("quick.doc", quick.getAttachments().get(0).getFilename()); } diff --git a/src/scratchpad/testcases/org/apache/poi/hmef/extractor/TestHMEFContentsExtractor.java b/src/scratchpad/testcases/org/apache/poi/hmef/extractor/TestHMEFContentsExtractor.java index 80e9be6726..4a786f5bca 100644 --- a/src/scratchpad/testcases/org/apache/poi/hmef/extractor/TestHMEFContentsExtractor.java +++ b/src/scratchpad/testcases/org/apache/poi/hmef/extractor/TestHMEFContentsExtractor.java @@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test; public class TestHMEFContentsExtractor { @Test - public void TestMain() throws IOException { + void testMain() throws IOException { POIDataSamples samples = POIDataSamples.getHMEFInstance(); File message = samples.getFile("quick-winmail.dat"); File outputDirectory = TempFile.createTempDirectory("quick-winmail-main"); @@ -58,7 +58,7 @@ public class TestHMEFContentsExtractor { } @Test - public void TestExtractMessageBody_OutputStream() throws IOException { + void testExtractMessageBody_OutputStream() throws IOException { POIDataSamples samples = POIDataSamples.getHMEFInstance(); File winmailTNEFFile = samples.getFile("quick-winmail.dat"); HMEFContentsExtractor extractor = new HMEFContentsExtractor(winmailTNEFFile); @@ -72,7 +72,7 @@ public class TestHMEFContentsExtractor { } @Test - public void TestExtractMessageBody_File() throws IOException { + void testExtractMessageBody_File() throws IOException { POIDataSamples samples = POIDataSamples.getHMEFInstance(); File winmailTNEFFile = samples.getFile("quick-winmail.dat"); HMEFContentsExtractor extractor = new HMEFContentsExtractor(winmailTNEFFile); diff --git a/src/scratchpad/testcases/org/apache/poi/hpbf/TestHPBFDocument.java b/src/scratchpad/testcases/org/apache/poi/hpbf/TestHPBFDocument.java index 6bd9f05342..eccb4ce8ec 100644 --- a/src/scratchpad/testcases/org/apache/poi/hpbf/TestHPBFDocument.java +++ b/src/scratchpad/testcases/org/apache/poi/hpbf/TestHPBFDocument.java @@ -31,7 +31,7 @@ public final class TestHPBFDocument { private static final POIDataSamples _samples = POIDataSamples.getPublisherInstance(); @Test - public void testOpen() throws IOException { + void testOpen() throws IOException { InputStream is = _samples.openResourceAsStream("Sample.pub"); HPBFDocument doc = new HPBFDocument(is); is.close(); @@ -40,7 +40,7 @@ public final class TestHPBFDocument { } @Test - public void testBits() throws IOException { + void testBits() throws IOException { InputStream is = _samples.openResourceAsStream("Sample.pub"); HPBFDocument doc = new HPBFDocument(is); is.close(); @@ -59,6 +59,6 @@ public final class TestHPBFDocument { } // TODO -// public void testWrite() throws Exception { +// void testWrite() throws Exception { // } } diff --git a/src/scratchpad/testcases/org/apache/poi/hpbf/extractor/TestPublisherTextExtractor.java b/src/scratchpad/testcases/org/apache/poi/hpbf/extractor/TestPublisherTextExtractor.java index 0495040238..13fae5982f 100644 --- a/src/scratchpad/testcases/org/apache/poi/hpbf/extractor/TestPublisherTextExtractor.java +++ b/src/scratchpad/testcases/org/apache/poi/hpbf/extractor/TestPublisherTextExtractor.java @@ -68,7 +68,7 @@ public final class TestPublisherTextExtractor { "0123456789abcdef0123456789abcdef0123456789abcdef\n"; @Test - public void testBasics() throws IOException { + void testBasics() throws IOException { InputStream sample = _samples.openResourceAsStream("Sample.pub"); HPBFDocument doc = new HPBFDocument(sample); PublisherTextExtractor ext = new PublisherTextExtractor(doc); @@ -85,7 +85,7 @@ public final class TestPublisherTextExtractor { } @Test - public void testContents() throws IOException { + void testContents() throws IOException { // Check this complicated file using POIFS InputStream sample = _samples.openResourceAsStream("Sample.pub"); HPBFDocument docOPOIFS = new HPBFDocument(sample); @@ -118,7 +118,7 @@ public final class TestPublisherTextExtractor { * Publisher 2007. Check they all agree. */ @Test - public void testMultipleVersions() throws Exception { + void testMultipleVersions() throws Exception { InputStream sample = _samples.openResourceAsStream("Sample.pub"); HPBFDocument doc = new HPBFDocument(sample); PublisherTextExtractor ext = new PublisherTextExtractor(doc); @@ -153,7 +153,7 @@ public final class TestPublisherTextExtractor { * to. */ @Test - public void testWithHyperlinks() throws Exception { + void testWithHyperlinks() throws Exception { InputStream linkAt = _samples.openResourceAsStream("LinkAt10.pub"); HPBFDocument doc = new HPBFDocument(linkAt); diff --git a/src/scratchpad/testcases/org/apache/poi/hpbf/model/TestEscherParts.java b/src/scratchpad/testcases/org/apache/poi/hpbf/model/TestEscherParts.java index 39d18df778..c96fdbda80 100644 --- a/src/scratchpad/testcases/org/apache/poi/hpbf/model/TestEscherParts.java +++ b/src/scratchpad/testcases/org/apache/poi/hpbf/model/TestEscherParts.java @@ -31,7 +31,7 @@ public final class TestEscherParts { private static final POIDataSamples _samples = POIDataSamples.getPublisherInstance(); @Test - public void testBasics() throws IOException { + void testBasics() throws IOException { InputStream is = _samples.openResourceAsStream("Sample.pub"); HPBFDocument doc = new HPBFDocument(is); is.close(); @@ -50,7 +50,7 @@ public final class TestEscherParts { } @Test - public void testComplex() throws Exception { + void testComplex() throws Exception { InputStream is = _samples.openResourceAsStream("SampleBrochure.pub"); HPBFDocument doc1 = new HPBFDocument(is); is.close(); diff --git a/src/scratchpad/testcases/org/apache/poi/hpbf/model/TestQuillContents.java b/src/scratchpad/testcases/org/apache/poi/hpbf/model/TestQuillContents.java index e614691577..8fd5a6bf3b 100644 --- a/src/scratchpad/testcases/org/apache/poi/hpbf/model/TestQuillContents.java +++ b/src/scratchpad/testcases/org/apache/poi/hpbf/model/TestQuillContents.java @@ -39,7 +39,7 @@ public final class TestQuillContents { private static final POIDataSamples _samples = POIDataSamples.getPublisherInstance(); @Test - public void testBasics() throws IOException { + void testBasics() throws IOException { HPBFDocument doc = new HPBFDocument( _samples.openResourceAsStream("Sample.pub") ); @@ -73,7 +73,7 @@ public final class TestQuillContents { } @Test - public void testText() throws IOException { + void testText() throws IOException { HPBFDocument doc = new HPBFDocument( _samples.openResourceAsStream("Sample.pub") ); @@ -90,7 +90,7 @@ public final class TestQuillContents { } @Test - public void testPLC() throws IOException { + void testPLC() throws IOException { HPBFDocument doc = new HPBFDocument( _samples.openResourceAsStream("Simple.pub") ); @@ -154,7 +154,7 @@ public final class TestQuillContents { @SuppressWarnings("unused") @Test - public void testComplexPLC() throws IOException { + void testComplexPLC() throws IOException { HPBFDocument doc = new HPBFDocument( _samples.openResourceAsStream("Sample.pub") ); @@ -258,7 +258,7 @@ public final class TestQuillContents { } @Test - public void testNoHyperlinks() throws IOException { + void testNoHyperlinks() throws IOException { HPBFDocument doc = new HPBFDocument( _samples.openResourceAsStream("SampleNewsletter.pub") ); @@ -277,7 +277,7 @@ public final class TestQuillContents { } @Test - public void testSimpleHyperlink() throws IOException { + void testSimpleHyperlink() throws IOException { HPBFDocument doc; QuillContents qc; Type12 hlBit; @@ -329,7 +329,7 @@ public final class TestQuillContents { } @Test - public void testManyHyperlinks() throws IOException { + void testManyHyperlinks() throws IOException { HPBFDocument doc; QuillContents qc; Type12 hlBit; @@ -352,7 +352,7 @@ public final class TestQuillContents { } @Test - public void testHyperlinkDifferentVersions() throws IOException { + void testHyperlinkDifferentVersions() throws IOException { HPBFDocument doc; QuillContents qc; Type12 hlBitA; diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/TestEncryptedFile.java b/src/scratchpad/testcases/org/apache/poi/hslf/TestEncryptedFile.java index 1fe829c2e1..64e61a4c14 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/TestEncryptedFile.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/TestEncryptedFile.java @@ -36,7 +36,7 @@ public final class TestEncryptedFile { private static final POIDataSamples slTests = POIDataSamples.getSlideShowInstance(); @Test - public void testLoadNonEncrypted() throws IOException { + void testLoadNonEncrypted() throws IOException { InputStream is = slTests.openResourceAsStream("basic_test_ppt_file.ppt"); HSLFSlideShowImpl hss = new HSLFSlideShowImpl(is); assertNotNull(hss); @@ -45,21 +45,21 @@ public final class TestEncryptedFile { } @Test - public void testLoadEncrypted1() throws IOException { + void testLoadEncrypted1() throws IOException { try (InputStream is = slTests.openResourceAsStream("Password_Protected-hello.ppt")) { assertThrows(EncryptedPowerPointFileException.class, () -> new HSLFSlideShowImpl(is).close()); } } @Test - public void testLoadEncrypted2() throws IOException { + void testLoadEncrypted2() throws IOException { try (InputStream is = slTests.openResourceAsStream("Password_Protected-np-hello.ppt")) { assertThrows(EncryptedPowerPointFileException.class, () -> new HSLFSlideShowImpl(is).close()); } } @Test - public void testLoadEncrypted3() throws IOException { + void testLoadEncrypted3() throws IOException { try (InputStream is = slTests.openResourceAsStream("Password_Protected-56-hello.ppt")) { assertThrows(EncryptedPowerPointFileException.class, () -> new HSLFSlideShowImpl(is).close()); } diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/TestPOIDocumentScratchpad.java b/src/scratchpad/testcases/org/apache/poi/hslf/TestPOIDocumentScratchpad.java index ee74b4527f..9ee032275f 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/TestPOIDocumentScratchpad.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/TestPOIDocumentScratchpad.java @@ -62,7 +62,7 @@ public final class TestPOIDocumentScratchpad { } @Test - public void testReadProperties() { + void testReadProperties() { testReadPropertiesHelper(doc); } @@ -77,7 +77,7 @@ public final class TestPOIDocumentScratchpad { } @Test - public void testReadProperties2() { + void testReadProperties2() { // Check again on the word one assertNotNull(doc2.getDocumentSummaryInformation()); assertNotNull(doc2.getSummaryInformation()); @@ -88,7 +88,7 @@ public final class TestPOIDocumentScratchpad { } @Test - public void testWriteProperties() throws IOException { + void testWriteProperties() throws IOException { // Just check we can write them back out into a filesystem POIFSFileSystem outFS = new POIFSFileSystem(); doc.writeProperties(outFS); @@ -100,7 +100,7 @@ public final class TestPOIDocumentScratchpad { } @Test - public void testWriteReadProperties() throws IOException { + void testWriteReadProperties() throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); // Write them out diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java b/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java index 1eb72a88bf..fc99dc955d 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java @@ -68,7 +68,7 @@ public final class TestReWrite { } @Test - public void testWritesOutTheSame() throws Exception { + void testWritesOutTheSame() throws Exception { assertWritesOutTheSame(hssA, pfsA); assertWritesOutTheSame(hssB, pfsB); } @@ -119,7 +119,7 @@ public final class TestReWrite { } @Test - public void testWithMacroStreams() throws IOException { + void testWithMacroStreams() throws IOException { // Check that they're apparently the same assertSlideShowWritesOutTheSame(hssC, pfsC); @@ -148,7 +148,7 @@ public final class TestReWrite { * doesn't change things */ @Test - public void testSlideShowWritesOutTheSame() throws Exception { + void testSlideShowWritesOutTheSame() throws Exception { assertSlideShowWritesOutTheSame(hssA, pfsA); // Some bug in StyleTextPropAtom rewriting means this will fail @@ -192,7 +192,7 @@ public final class TestReWrite { } @Test - public void test48593() throws IOException { + void test48593() throws IOException { HSLFSlideShow ppt1 = new HSLFSlideShow(); ppt1.createSlide(); HSLFSlideShow ppt2 = HSLFTestDataSamples.writeOutAndReadBack(ppt1); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/TestReWriteSanity.java b/src/scratchpad/testcases/org/apache/poi/hslf/TestReWriteSanity.java index c252aff7ed..152f0b9a92 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/TestReWriteSanity.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/TestReWriteSanity.java @@ -63,7 +63,7 @@ public final class TestReWriteSanity { } @Test - public void testUserEditAtomsRight() throws Exception { + void testUserEditAtomsRight() throws Exception { // Write out to a byte array ByteArrayOutputStream baos = new ByteArrayOutputStream(); ss.write(baos); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/TestRecordCounts.java b/src/scratchpad/testcases/org/apache/poi/hslf/TestRecordCounts.java index db3fd24868..312ca490dd 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/TestRecordCounts.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/TestRecordCounts.java @@ -45,7 +45,7 @@ public final class TestRecordCounts { } @Test - public void testSheetsCount() { + void testSheetsCount() { // Top level Record[] r = ss.getRecords(); @@ -60,7 +60,7 @@ public final class TestRecordCounts { } @Test - public void testNotesCount() { + void testNotesCount() { // Top level Record[] r = ss.getRecords(); @@ -75,7 +75,7 @@ public final class TestRecordCounts { } @Test - public void testSlideListWithTextCount() { + void testSlideListWithTextCount() { // Second level Record[] rt = ss.getRecords(); Record[] r = rt[0].getChildRecords(); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java index 5743e34e94..8828eb4dd9 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java @@ -103,7 +103,7 @@ public abstract class BasePPTIteratingTest { @ParameterizedTest @MethodSource("files") - public void testAllFiles(File file) throws Exception { + void testAllFiles(File file) throws Exception { String fileName = file.getName(); Class t = null; if (EXCLUDED.containsKey(fileName)) { diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPDrawingTextListing.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPDrawingTextListing.java index 48d983280a..5b135a5e88 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPDrawingTextListing.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPDrawingTextListing.java @@ -27,7 +27,7 @@ import static org.junit.jupiter.api.Assertions.fail; public class TestPPDrawingTextListing extends BasePPTIteratingTest { @Test - public void testMain() throws IOException { + void testMain() throws IOException { // calls System.exit(): PPDrawingTextListing.main(new String[0]); assertThrows(EmptyFileException.class, () -> PPDrawingTextListing.main(new String[]{"invalidfile"})); } diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPTXMLDump.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPTXMLDump.java index 114f10d2db..c70b25ec66 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPTXMLDump.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPTXMLDump.java @@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test; public class TestPPTXMLDump extends BasePPTIteratingTest { @Test - public void testMain() throws Exception { + void testMain() throws Exception { PPTXMLDump.main(new String[0]); PPTXMLDump.main(new String[]{ diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTListing.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTListing.java index aada03506a..3dc19422f2 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTListing.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTListing.java @@ -44,7 +44,7 @@ public class TestSLWTListing extends BasePPTIteratingTest { } @Test - public void testMain() throws IOException { + void testMain() throws IOException { // calls System.exit(): SLWTListing.main(new String[0]); assertThrows(EmptyFileException.class, () -> SLWTListing.main(new String[]{"invalidfile"})); } diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTTextListing.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTTextListing.java index ae2cf58558..ced2727094 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTTextListing.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTTextListing.java @@ -27,7 +27,7 @@ import static org.junit.jupiter.api.Assertions.fail; public class TestSLWTTextListing extends BasePPTIteratingTest { @Test - public void testMain() throws IOException { + void testMain() throws IOException { // calls System.exit(): SLWTTextListing.main(new String[0]); assertThrows(EmptyFileException.class, () -> SLWTTextListing.main(new String[]{"invalidfile"})); } diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideAndNotesAtomListing.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideAndNotesAtomListing.java index 395ac33687..cec26a035a 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideAndNotesAtomListing.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideAndNotesAtomListing.java @@ -28,7 +28,7 @@ import static org.junit.jupiter.api.Assertions.fail; public class TestSlideAndNotesAtomListing extends BasePPTIteratingTest { @Test - public void testMain() throws IOException { + void testMain() throws IOException { // calls System.exit(): SlideAndNotesAtomListing.main(new String[0]); SlideAndNotesAtomListing.main(new String[] { HSLFTestDataSamples.getSampleFile("slide_master.ppt").getAbsolutePath() diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideIdListing.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideIdListing.java index aeae69a5f0..528b694886 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideIdListing.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideIdListing.java @@ -28,7 +28,7 @@ import static org.junit.jupiter.api.Assertions.fail; public class TestSlideIdListing extends BasePPTIteratingTest { @Test - public void testMain() throws IOException { + void testMain() throws IOException { // calls System.exit(): SlideIdListing.main(new String[0]); SlideIdListing.main(new String[] { HSLFTestDataSamples.getSampleFile("slide_master.ppt").getAbsolutePath() diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowDumper.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowDumper.java index b1bb6db958..d39cbdcfc1 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowDumper.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowDumper.java @@ -40,7 +40,7 @@ public class TestSlideShowDumper extends BasePPTIteratingTest { } @Test - public void testMain() throws IOException { + void testMain() throws IOException { // SlideShowDumper calls IOUtils.toByteArray(is), which would fail if a different size is defined IOUtils.setByteArrayMaxOverride(-1); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowRecordDumper.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowRecordDumper.java index a4ec6ca1f8..8d24389302 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowRecordDumper.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowRecordDumper.java @@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test; public class TestSlideShowRecordDumper extends BasePPTIteratingTest { @Test - public void testMain() throws IOException { + void testMain() throws IOException { SlideShowRecordDumper.main(new String[] { HSLFTestDataSamples.getSampleFile("slide_master.ppt").getAbsolutePath(), }); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestTextStyleListing.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestTextStyleListing.java index 8ebce9c569..d5c4892e18 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestTextStyleListing.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestTextStyleListing.java @@ -34,7 +34,7 @@ public class TestTextStyleListing extends BasePPTIteratingTest { } @Test - public void testMain() throws IOException { + void testMain() throws IOException { // calls System.exit(): TextStyleListing.main(new String[0]); assertThrows(EmptyFileException.class, () -> TextStyleListing.main(new String[]{"invalidfile"})); } diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestUserEditAndPersistListing.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestUserEditAndPersistListing.java index c49a4c8a3c..cfa2575e50 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestUserEditAndPersistListing.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestUserEditAndPersistListing.java @@ -27,7 +27,7 @@ import static org.junit.jupiter.api.Assertions.fail; public class TestUserEditAndPersistListing extends BasePPTIteratingTest { @Test - public void testMain() throws IOException { + void testMain() throws IOException { // calls System.exit(): UserEditAndPersistListing.main(new String[0]); assertThrows(EmptyFileException.class, () -> UserEditAndPersistListing.main(new String[]{"invalidfile"})); } diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestCruddyExtractor.java b/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestCruddyExtractor.java index 39746e2ebd..41128d7841 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestCruddyExtractor.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestCruddyExtractor.java @@ -68,7 +68,7 @@ public final class TestCruddyExtractor { } @Test - public void testReadAsVector() { + void testReadAsVector() { // Extract the text from the file as a vector List foundTextV = te.getTextAsVector(); @@ -81,7 +81,7 @@ public final class TestCruddyExtractor { } @Test - public void testReadAsString() { + void testReadAsString() { // Extract the text as a String String foundText = te.getTextAsString(); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestExtractor.java b/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestExtractor.java index d787aba7d5..74ff702ece 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestExtractor.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestExtractor.java @@ -83,7 +83,7 @@ public final class TestExtractor { } @Test - public void testReadSheetText() throws IOException { + void testReadSheetText() throws IOException { // Basic 2 page example try (SlideShowExtractor ppe = openExtractor("basic_test_ppt_file.ppt")) { assertEquals(EXPECTED_PAGE1+EXPECTED_PAGE2, ppe.getText()); @@ -103,7 +103,7 @@ public final class TestExtractor { } @Test - public void testReadNoteText() throws IOException { + void testReadNoteText() throws IOException { // Basic 2 page example try (SlideShowExtractor ppe = openExtractor("basic_test_ppt_file.ppt")) { ppe.setNotesByDefault(true); @@ -125,7 +125,7 @@ public final class TestExtractor { } @Test - public void testReadBoth() throws IOException { + void testReadBoth() throws IOException { String[] slText = { EXPECTED_PAGE1, EXPECTED_PAGE2 }; String[] ntText = { NOTES_PAGE1, NOTES_PAGE2 }; @@ -149,7 +149,7 @@ public final class TestExtractor { * core record, we can still get the rest of the text out */ @Test - public void testMissingCoreRecords() throws IOException { + void testMissingCoreRecords() throws IOException { try (SlideShowExtractor ppe = openExtractor("missing_core_records.ppt")) { ppe.setSlidesByDefault(true); ppe.setNotesByDefault(false); @@ -170,7 +170,7 @@ public final class TestExtractor { } @Test - public void testExtractFromEmbeded() throws IOException { + void testExtractFromEmbeded() throws IOException { try (final InputStream is = POIDataSamples.getSpreadSheetInstance().openResourceAsStream("excel_with_embeded.xls"); final POIFSFileSystem fs = new POIFSFileSystem(is)) { final DirectoryNode root = fs.getRoot(); @@ -196,7 +196,7 @@ public final class TestExtractor { * A powerpoint file with embeded powerpoint files */ @Test - public void testExtractFromOwnEmbeded() throws IOException { + void testExtractFromOwnEmbeded() throws IOException { try (SlideShowExtractor ppe = openExtractor("ppt_with_embeded.ppt")) { List> shapes = ppe.getOLEShapes(); assertEquals(6, shapes.size(), "Expected 6 ole shapes"); @@ -229,7 +229,7 @@ public final class TestExtractor { * A powerpoint file with embeded powerpoint files */ @Test - public void test52991() throws IOException { + void test52991() throws IOException { try (SlideShowExtractor ppe = openExtractor("badzip.ppt")) { for (ObjectShape shape : ppe.getOLEShapes()) { IOUtils.copy(shape.getObjectData().getInputStream(), new ByteArrayOutputStream()); @@ -241,7 +241,7 @@ public final class TestExtractor { * From bug #45543 */ @Test - public void testWithComments() throws IOException { + void testWithComments() throws IOException { try (final SlideShowExtractor ppe = openExtractor("WithComments.ppt")) { String text = ppe.getText(); assertFalse(text.contains("This is a test comment"), "Comments not in by default"); @@ -269,7 +269,7 @@ public final class TestExtractor { * From bug #45537 */ @Test - public void testHeaderFooter() throws IOException { + void testHeaderFooter() throws IOException { // With a header on the notes try (InputStream is = slTests.openResourceAsStream("45537_Header.ppt"); HSLFSlideShow ppt = new HSLFSlideShow(is)) { @@ -304,7 +304,7 @@ public final class TestExtractor { } @Test - public void testSlideMasterText() throws IOException { + void testSlideMasterText() throws IOException { String masterTitleText = "This is the Master Title"; String masterRandomText = "This text comes from the Master Slide"; String masterFooterText = "Footer from the master slide"; @@ -327,7 +327,7 @@ public final class TestExtractor { } @Test - public void testSlideMasterText2() throws IOException { + void testSlideMasterText2() throws IOException { try (final SlideShowExtractor ppe = openExtractor("bug62591.ppt")) { ppe.setMasterByDefault(true); String text = ppe.getText(); @@ -336,7 +336,7 @@ public final class TestExtractor { } @Test - public void testMasterText() throws IOException { + void testMasterText() throws IOException { try (final SlideShowExtractor ppe = openExtractor("master_text.ppt")) { // Initially not there String text = ppe.getText(); @@ -366,7 +366,7 @@ public final class TestExtractor { * Bug #54880 Chinese text not extracted properly */ @Test - public void testChineseText() throws IOException { + void testChineseText() throws IOException { try (final SlideShowExtractor ppe = openExtractor("54880_chinese.ppt")) { String text = ppe.getText(); @@ -390,7 +390,7 @@ public final class TestExtractor { */ @SuppressWarnings("resource") @Test - public void testDifferentPOIFS() throws IOException { + void testDifferentPOIFS() throws IOException { // Open the two filesystems File pptFile = slTests.getFile("basic_test_ppt_file.ppt"); try (final POIFSFileSystem poifs = new POIFSFileSystem(pptFile, true)) { @@ -403,7 +403,7 @@ public final class TestExtractor { } @Test - public void testTable() throws Exception { + void testTable() throws Exception { try (SlideShowExtractor ppe = openExtractor("54111.ppt")) { String text = ppe.getText(); String target = "TH Cell 1\tTH Cell 2\tTH Cell 3\tTH Cell 4\n" + @@ -426,7 +426,7 @@ public final class TestExtractor { // bug 60003 @Test - public void testExtractMasterSlideFooterText() throws Exception { + void testExtractMasterSlideFooterText() throws Exception { try (SlideShowExtractor ppe = openExtractor("60003.ppt")) { ppe.setMasterByDefault(true); @@ -436,7 +436,7 @@ public final class TestExtractor { } @Test - public void testExtractGroupedShapeText() throws Exception { + void testExtractGroupedShapeText() throws Exception { try (final SlideShowExtractor ppe = openExtractor("bug62092.ppt")) { final String text = ppe.getText(); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestFreeform.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestFreeform.java index 9fca1e4ed9..8016278617 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestFreeform.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestFreeform.java @@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test; public final class TestFreeform { @Test - public void testClosedPath() { + void testClosedPath() { Path2D.Double path1 = new Path2D.Double(); path1.moveTo(100, 100); @@ -56,7 +56,7 @@ public final class TestFreeform { } @Test - public void testLine() { + void testLine() { Path2D.Double path1 = new Path2D.Double(new Line2D.Double(100, 100, 200, 100)); @@ -68,7 +68,7 @@ public final class TestFreeform { } @Test - public void testRectangle() { + void testRectangle() { Path2D.Double path1 = new Path2D.Double(new Rectangle2D.Double(100, 100, 200, 50)); @@ -84,7 +84,7 @@ public final class TestFreeform { * GEOMETRY__SEGMENTINFO is missing, see Bugzilla 54188 */ @Test - public void test54188() { + void test54188() { HSLFFreeformShape p = new HSLFFreeformShape(); Path2D path = p.getPath(); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHeadersFooters.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHeadersFooters.java index 3c3550fb1f..60d2136741 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHeadersFooters.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHeadersFooters.java @@ -47,7 +47,7 @@ public final class TestHeadersFooters private static POIDataSamples _slTests = POIDataSamples.getSlideShowInstance(); @Test - public void testRead() throws IOException { + void testRead() throws IOException { InputStream is = _slTests.openResourceAsStream("headers_footers.ppt"); HSLFSlideShow ppt = new HSLFSlideShow(is); is.close(); @@ -95,7 +95,7 @@ public final class TestHeadersFooters * If Headers / Footers are not set, all the getters should return false or null */ @Test - public void testReadNoHeadersFooters() throws Exception { + void testReadNoHeadersFooters() throws Exception { InputStream is = _slTests.openResourceAsStream("basic_test_ppt_file.ppt"); HSLFSlideShow ppt = new HSLFSlideShow(is); is.close(); @@ -135,7 +135,7 @@ public final class TestHeadersFooters * Test extraction of headers / footers from PPTs saved in Office 2007 */ @Test - public void testRead2007() throws IOException { + void testRead2007() throws IOException { InputStream is = _slTests.openResourceAsStream("headers_footers_2007.ppt"); HSLFSlideShow ppt = new HSLFSlideShow(is); is.close(); @@ -199,7 +199,7 @@ public final class TestHeadersFooters } @Test - public void testCreateSlideFooters() throws IOException { + void testCreateSlideFooters() throws IOException { HSLFSlideShow ppt1 = new HSLFSlideShow(); HeadersFooters hdd = ppt1.getSlideHeadersFooters(); hdd.setFootersText("My slide footer"); @@ -216,7 +216,7 @@ public final class TestHeadersFooters } @Test - public void testCreateNotesFooters() throws IOException { + void testCreateNotesFooters() throws IOException { HSLFSlideShow ppt1 = new HSLFSlideShow(); HeadersFooters hdd = ppt1.getNotesHeadersFooters(); hdd.setFootersText("My notes footer"); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java index d41f056042..bda71c08da 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java @@ -46,7 +46,7 @@ public final class TestHyperlink { private static POIDataSamples _slTests = POIDataSamples.getSlideShowInstance(); @Test - public void testTextRunHyperlinks() throws Exception { + void testTextRunHyperlinks() throws Exception { HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("WithLinks.ppt")); HSLFSlide slide = ppt.getSlides().get(0); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestLine.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestLine.java index 2b1965a892..4456dc5b22 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestLine.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestLine.java @@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test; public final class TestLine { @Test - public void testCreateLines() throws IOException { + void testCreateLines() throws IOException { HSLFSlideShow ppt = new HSLFSlideShow(); HSLFSlide slide = ppt.createSlide(); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestMovieShape.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestMovieShape.java index 315ca7198a..a90c591190 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestMovieShape.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestMovieShape.java @@ -40,7 +40,7 @@ public final class TestMovieShape { private static POIDataSamples _slTests = POIDataSamples.getSlideShowInstance(); @Test - public void testCreate() throws Exception { + void testCreate() throws Exception { HSLFSlideShow ppt = new HSLFSlideShow(); HSLFSlide slide = ppt.createSlide(); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestOleEmbedding.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestOleEmbedding.java index 2af1fdaa41..9c561fb18e 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestOleEmbedding.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestOleEmbedding.java @@ -49,7 +49,7 @@ public final class TestOleEmbedding { private static final POIDataSamples _slTests = POIDataSamples.getSlideShowInstance(); @Test - public void testOleEmbedding2003() throws IOException { + void testOleEmbedding2003() throws IOException { HSLFSlideShowImpl slideShow = new HSLFSlideShowImpl(_slTests.openResourceAsStream("ole2-embedding-2003.ppt")); // Placeholder EMFs for clients that don't support the OLE components. List pictures = slideShow.getPictureData(); @@ -78,7 +78,7 @@ public final class TestOleEmbedding { @Test - public void testOLEShape() throws IOException { + void testOLEShape() throws IOException { HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("ole2-embedding-2003.ppt")); HSLFSlide slide = ppt.getSlides().get(0); @@ -114,7 +114,7 @@ public final class TestOleEmbedding { } @Test - public void testEmbedding() throws IOException { + void testEmbedding() throws IOException { HSLFSlideShow ppt = new HSLFSlideShow(); File pict = POIDataSamples.getSlideShowInstance().getFile("clock.jpg"); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestPPFont.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestPPFont.java index 6994a2c13f..7045751956 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestPPFont.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestPPFont.java @@ -35,7 +35,7 @@ import org.junit.jupiter.api.Test; public final class TestPPFont { @Test - public void testCreate() throws IOException { + void testCreate() throws IOException { HSLFSlideShow ppt = new HSLFSlideShow(); assertEquals(1, ppt.getNumberOfFonts()); assertEquals("Arial", ppt.getFont(0).getTypeface()); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSetBoldItalic.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSetBoldItalic.java index db0114170e..9ab28fa66c 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSetBoldItalic.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSetBoldItalic.java @@ -36,7 +36,7 @@ public final class TestSetBoldItalic { * and set some of the style attributes */ @Test - public void testTextBoxWrite() throws Exception { + void testTextBoxWrite() throws Exception { HSLFSlideShow ppt = new HSLFSlideShow(); HSLFSlide sl = ppt.createSlide(); HSLFTextRun rt; diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestShapes.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestShapes.java index bc4a5f1bf6..0cb7dad0a4 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestShapes.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestShapes.java @@ -165,7 +165,7 @@ public final class TestShapes { @SuppressWarnings("unused") @Test - public void testParagraphs() throws IOException { + void testParagraphs() throws IOException { HSLFSlideShow ss = new HSLFSlideShow(); HSLFSlide slide = ss.createSlide(); HSLFTextBox shape = new HSLFTextBox(); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSheet.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSheet.java index f0efbc09b7..50fada2805 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSheet.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSheet.java @@ -42,7 +42,7 @@ public final class TestSheet { * For each ppt in the test directory check that all sheets are properly initialized */ @Test - public void testSheet() throws Exception { + void testSheet() throws Exception { String[] tests = {"SampleShow.ppt", "backgrounds.ppt", "text_shapes.ppt", "pictures.ppt"}; for (String file : tests) { try { diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideChangeNotes.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideChangeNotes.java index d7d1ab493a..7e98adec07 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideChangeNotes.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideChangeNotes.java @@ -43,7 +43,7 @@ public final class TestSlideChangeNotes { } @Test - public void testSetToNone() { + void testSetToNone() { HSLFSlide slideOne = ss.getSlides().get(0); SlideAtom sa = slideOne.getSlideRecord().getSlideAtom(); @@ -53,7 +53,7 @@ public final class TestSlideChangeNotes { } @Test - public void testSetToSomething() { + void testSetToSomething() { HSLFSlide slideOne = ss.getSlides().get(0); HSLFNotes notesOne = ss.getNotes().get(1); SlideAtom sa = slideOne.getSlideRecord().getSlideAtom(); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideMaster.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideMaster.java index d2d21539c0..a50958ff79 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideMaster.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideMaster.java @@ -56,7 +56,7 @@ public final class TestSlideMaster { * Check we can read their attributes. */ @Test - public void testSlideMaster() throws IOException { + void testSlideMaster() throws IOException { final HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("slide_master.ppt")); final Environment env = ppt.getDocumentRecord().getEnvironment(); @@ -108,7 +108,7 @@ public final class TestSlideMaster { * Test we can read default text attributes for a title master sheet */ @Test - public void testTitleMasterTextAttributes() throws IOException { + void testTitleMasterTextAttributes() throws IOException { HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("slide_master.ppt")); assertEquals(1, ppt.getTitleMasters().size()); @@ -131,7 +131,7 @@ public final class TestSlideMaster { * Slide 3 has title layout and follows the TitleMaster. Verify that. */ @Test - public void testTitleMaster() throws IOException { + void testTitleMaster() throws IOException { HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("slide_master.ppt")); HSLFSlide slide = ppt.getSlides().get(2); HSLFMasterSheet masterSheet = slide.getMasterSheet(); @@ -162,7 +162,7 @@ public final class TestSlideMaster { * If a style attribute is not set ensure it is read from the master */ @Test - public void testMasterAttributes() throws Exception { + void testMasterAttributes() throws Exception { HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("slide_master.ppt")); List slide = ppt.getSlides(); assertEquals(3, slide.size()); @@ -211,7 +211,7 @@ public final class TestSlideMaster { * Check we can dynamically assign a slide master to a slide. */ @Test - public void testChangeSlideMaster() throws IOException { + void testChangeSlideMaster() throws IOException { HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("slide_master.ppt")); List master = ppt.getSlideMasters(); List slide = ppt.getSlides(); @@ -248,7 +248,7 @@ public final class TestSlideMaster { * (typical for the "bullted body" placeholder) */ @Test - public void testIndentation() throws IOException { + void testIndentation() throws IOException { HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("slide_master.ppt")); HSLFSlide slide = ppt.getSlides().get(0); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlides.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlides.java index 035731f2fa..c539a09b03 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlides.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlides.java @@ -41,7 +41,7 @@ public final class TestSlides { * @throws Exception */ @Test - public void testAddSlides1() throws Exception { + void testAddSlides1() throws Exception { HSLFSlideShow ppt = new HSLFSlideShow(new HSLFSlideShowImpl( TestSlides.class.getResourceAsStream("/org/apache/poi/hslf/data/empty.ppt") )); assertTrue(ppt.getSlides().isEmpty()); @@ -65,7 +65,7 @@ public final class TestSlides { * @throws Exception */ @Test - public void testAddSlides2() throws Exception { + void testAddSlides2() throws Exception { HSLFSlideShow ppt = new HSLFSlideShow(new HSLFSlideShowImpl( TestSlides.class.getResourceAsStream("/org/apache/poi/hslf/data/empty.ppt") )); assertTrue(ppt.getSlides().isEmpty()); @@ -95,7 +95,7 @@ public final class TestSlides { * @throws Exception */ @Test - public void testAddSlides3() throws Exception { + void testAddSlides3() throws Exception { HSLFSlideShow ppt = new HSLFSlideShow(new HSLFSlideShowImpl( TestSlides.class.getResourceAsStream("/org/apache/poi/hslf/data/empty.ppt") )); assertTrue(ppt.getSlides().isEmpty()); @@ -143,7 +143,7 @@ public final class TestSlides { * Add slides to ppt which already has two slides */ @Test - public void testAddSlides2to3() throws Exception { + void testAddSlides2to3() throws Exception { POIDataSamples slTests = POIDataSamples.getSlideShowInstance(); HSLFSlideShow ppt = new HSLFSlideShow(slTests.openResourceAsStream("basic_test_ppt_file.ppt")); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTable.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTable.java index 640360ea7a..1777ffed2c 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTable.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTable.java @@ -51,7 +51,7 @@ public final class TestTable { * Test that ShapeFactory works properly and returns Table */ @Test - public void testShapeFactory() throws IOException { + void testShapeFactory() throws IOException { final int noColumns, noRows; ByteArrayOutputStream out = new ByteArrayOutputStream(); try (HSLFSlideShow ppt = new HSLFSlideShow()) { @@ -89,7 +89,7 @@ public final class TestTable { * Error constructing Table when rownum=1 */ @Test - public void test45889() throws IOException { + void test45889() throws IOException { try (HSLFSlideShow ppt = new HSLFSlideShow()) { HSLFSlide slide = ppt.createSlide(); List shapes; @@ -110,7 +110,7 @@ public final class TestTable { // Table(rownum, colnum) must throw IllegalArgumentException if any of the arguments is less than 1 @Test - public void testIllegalRowCnstruction() throws IOException { + void testIllegalRowCnstruction() throws IOException { try (HSLFSlideShow ppt = new HSLFSlideShow()) { HSLFSlide slide = ppt.createSlide(); assertThrows(IllegalArgumentException.class, () -> slide.createTable(0, 5)); @@ -119,7 +119,7 @@ public final class TestTable { // Table(rownum, colnum) must throw IllegalArgumentException if any of the arguments is less than 1 @Test - public void testIllegalColConstruction() throws IOException { + void testIllegalColConstruction() throws IOException { try (HSLFSlideShow ppt = new HSLFSlideShow()) { HSLFSlide slide = ppt.createSlide(); assertThrows(IllegalArgumentException.class, () -> slide.createTable(5, 0)); @@ -131,7 +131,7 @@ public final class TestTable { * when the table is positioned with its top at -1 */ @Test - public void test57820() throws IOException { + void test57820() throws IOException { try (SlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("bug57820-initTableNullRefrenceException.ppt"))) { List> slides = ppt.getSlides(); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTextRunReWrite.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTextRunReWrite.java index 3642769ccb..dd8209aa35 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTextRunReWrite.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTextRunReWrite.java @@ -55,7 +55,7 @@ public final class TestTextRunReWrite { } @Test - public void testWritesOutTheSameNonRich() throws IOException { + void testWritesOutTheSameNonRich() throws IOException { // Ensure the text lengths are as we'd expect to start with assertEquals(1, ss.getSlides().size()); assertEquals(2, ss.getSlides().get(0).getTextParagraphs().size()); @@ -117,7 +117,7 @@ public final class TestTextRunReWrite { } @Test - public void testWritesOutTheSameRich() throws IOException { + void testWritesOutTheSameRich() throws IOException { // Grab the first text run on the first sheet List tr1 = ss.getSlides().get(0).getTextParagraphs().get(0); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestAnimationInfoAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestAnimationInfoAtom.java index 08c5ff8c62..21d25007db 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestAnimationInfoAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestAnimationInfoAtom.java @@ -45,7 +45,7 @@ public final class TestAnimationInfoAtom { }; @Test - public void testRead() { + void testRead() { AnimationInfoAtom record = new AnimationInfoAtom(data, 0, data.length); assertEquals(RecordTypes.AnimationInfoAtom.typeID, record.getRecordType()); assertTrue(record.getFlag(AnimationInfoAtom.Automatic)); @@ -64,7 +64,7 @@ public final class TestAnimationInfoAtom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { AnimationInfoAtom record = new AnimationInfoAtom(data, 0, data.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); record.writeOut(baos); @@ -74,7 +74,7 @@ public final class TestAnimationInfoAtom { } @Test - public void testNewRecord() throws Exception { + void testNewRecord() throws Exception { AnimationInfoAtom record = new AnimationInfoAtom(); record.setDimColor(0x07000000); record.setOrderID(2); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestCString.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestCString.java index 25f94cb9af..a117037832 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestCString.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestCString.java @@ -38,7 +38,7 @@ public final class TestCString { 0x65, 0, 0x6E, 0, 0x74, 0, 0x73, 0 }; @Test - public void testRecordType() { + void testRecordType() { CString ca = new CString(data_a, 0, data_a.length); assertEquals(4026L, ca.getRecordType()); CString cb = new CString(data_b, 0, data_a.length); @@ -46,7 +46,7 @@ public final class TestCString { } @Test - public void testCount() { + void testCount() { CString ca = new CString(data_a, 0, data_a.length); assertEquals(0, ca.getOptions()); CString cb = new CString(data_b, 0, data_a.length); @@ -57,7 +57,7 @@ public final class TestCString { } @Test - public void testText() { + void testText() { CString ca = new CString(data_a, 0, data_a.length); assertEquals("Hogwarts", ca.getText()); CString cb = new CString(data_b, 0, data_a.length); @@ -68,7 +68,7 @@ public final class TestCString { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { CString ca = new CString(data_a, 0, data_a.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ca.writeOut(baos); @@ -92,7 +92,7 @@ public final class TestCString { // Turn data_a into data_b @Test - public void testChange() throws Exception { + void testChange() throws Exception { CString ca = new CString(data_a, 0, data_a.length); ca.setText("Comments"); ca.setOptions(0x10); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestColorSchemeAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestColorSchemeAtom.java index 6cd58a8858..768ca20623 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestColorSchemeAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestColorSchemeAtom.java @@ -37,13 +37,13 @@ public final class TestColorSchemeAtom { }; @Test - public void testRecordType() { + void testRecordType() { ColorSchemeAtom csa = new ColorSchemeAtom(data_a,0,data_a.length); assertEquals(2032L, csa.getRecordType()); } @Test - public void testToRGB() { + void testToRGB() { byte[] rgb = ColorSchemeAtom.splitRGB(3669760); assertEquals(3,rgb.length); @@ -53,7 +53,7 @@ public final class TestColorSchemeAtom { } @Test - public void testFromRGB() { + void testFromRGB() { byte[] rgb_a = new byte[] { 0, 255-256, 55 }; byte[] rgb_b = new byte[] { 255-256, 127, 79 }; @@ -65,7 +65,7 @@ public final class TestColorSchemeAtom { } @Test - public void testRGBs() { + void testRGBs() { ColorSchemeAtom csa = new ColorSchemeAtom(data_a,0,data_a.length); assertEquals( 16777215 , csa.getBackgroundColourRGB() ); @@ -79,7 +79,7 @@ public final class TestColorSchemeAtom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { ColorSchemeAtom csa = new ColorSchemeAtom(data_a,0,data_a.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); csa.writeOut(baos); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestComment2000.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestComment2000.java index f5e158aa2f..19a12a95a2 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestComment2000.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestComment2000.java @@ -100,26 +100,26 @@ public final class TestComment2000 { } @Test - public void testRecordType() { + void testRecordType() { Comment2000 ca = new Comment2000(data_a, 0, data_a.length); assertEquals(12000L, ca.getRecordType()); } @Test - public void testAuthor() { + void testAuthor() { Comment2000 ca = new Comment2000(data_a, 0, data_a.length); assertEquals("Dumbledore", ca.getAuthor()); assertEquals("D", ca.getAuthorInitials()); } @Test - public void testText() { + void testText() { Comment2000 ca = new Comment2000(data_a, 0, data_a.length); assertEquals("Yes, they certainly are, aren't they!", ca.getText()); } @Test - public void testCommentAtom() throws Exception { + void testCommentAtom() throws Exception { Comment2000 ca = new Comment2000(data_a, 0, data_a.length); Comment2000Atom c2a = ca.getComment2000Atom(); @@ -131,7 +131,7 @@ public final class TestComment2000 { } @Test - public void testCommentAtomB() throws Exception { + void testCommentAtomB() throws Exception { Comment2000 cb = new Comment2000(data_b, 0, data_b.length); Comment2000Atom c2b = cb.getComment2000Atom(); @@ -143,7 +143,7 @@ public final class TestComment2000 { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { Comment2000 ca = new Comment2000(data_a, 0, data_a.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ca.writeOut(baos); @@ -157,7 +157,7 @@ public final class TestComment2000 { // Change a few things @Test - public void testChange() throws Exception { + void testChange() throws Exception { Comment2000 ca = new Comment2000(data_a, 0, data_a.length); Comment2000 cb = new Comment2000(data_b, 0, data_b.length); Comment2000 cn = new Comment2000(); @@ -223,7 +223,7 @@ public final class TestComment2000 { * A Comment2000 records with missing commentTextAtom */ @Test - public void testBug44770() { + void testBug44770() { byte[] data = { 0x0F, 0x00, (byte)0xE0, 0x2E, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, (byte)0xBA, 0x0F, 0x08, 0x00, 0x00, 0x00, 0x4E, 0x00, 0x45, 0x00, 0x53, 0x00, 0x53, 0x00, 0x20, diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestComment2000Atom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestComment2000Atom.java index 77ecc945ad..0568afaef5 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestComment2000Atom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestComment2000Atom.java @@ -60,13 +60,13 @@ public final class TestComment2000Atom { } @Test - public void testRecordType() { + void testRecordType() { Comment2000Atom ca = new Comment2000Atom(data_a, 0, data_a.length); assertEquals(12001l, ca.getRecordType()); } @Test - public void testGetDate() throws Exception { + void testGetDate() throws Exception { Comment2000Atom ca = new Comment2000Atom(data_a, 0, data_a.length); Comment2000Atom cb = new Comment2000Atom(data_b, 0, data_b.length); @@ -80,7 +80,7 @@ public final class TestComment2000Atom { } @Test - public void testGetNums() { + void testGetNums() { Comment2000Atom ca = new Comment2000Atom(data_a, 0, data_a.length); Comment2000Atom cb = new Comment2000Atom(data_b, 0, data_b.length); @@ -91,7 +91,7 @@ public final class TestComment2000Atom { } @Test - public void testGetPos() { + void testGetPos() { Comment2000Atom ca = new Comment2000Atom(data_a, 0, data_a.length); Comment2000Atom cb = new Comment2000Atom(data_b, 0, data_b.length); @@ -105,7 +105,7 @@ public final class TestComment2000Atom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { Comment2000Atom ca = new Comment2000Atom(data_a, 0, data_a.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ca.writeOut(baos); @@ -119,7 +119,7 @@ public final class TestComment2000Atom { // Create A from scratch @Test - public void testCreate() throws Exception { + void testCreate() throws Exception { Comment2000Atom a = new Comment2000Atom(); // Set number, x and y @@ -144,7 +144,7 @@ public final class TestComment2000Atom { // Try to turn a into b @Test - public void testChange() throws Exception { + void testChange() throws Exception { Comment2000Atom ca = new Comment2000Atom(data_a, 0, data_a.length); // Change the number diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java index 1623b61fac..860f7d5494 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java @@ -54,13 +54,13 @@ public final class TestDocument { } @Test - public void testRecordType() { + void testRecordType() { Document dr = getDocRecord(); assertEquals(1000, dr.getRecordType()); } @Test - public void testChildRecords() { + void testChildRecords() { Document dr = getDocRecord(); assertNotNull(dr.getDocumentAtom()); @@ -74,7 +74,7 @@ public final class TestDocument { } @Test - public void testEnvironment() { + void testEnvironment() { Document dr = getDocRecord(); Environment env = dr.getEnvironment(); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentAtom.java index 52daf6ba95..06bca9df9b 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentAtom.java @@ -39,13 +39,13 @@ public final class TestDocumentAtom { 1, 0, 0, 0, 0, 0, 0, 1 }; @Test - public void testRecordType() { + void testRecordType() { DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length); assertEquals(1001l, da.getRecordType()); } @Test - public void testSizeAndZoom() { + void testSizeAndZoom() { DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length); assertEquals(5760L, da.getSlideSizeX()); assertEquals(4320L, da.getSlideSizeY()); @@ -57,21 +57,21 @@ public final class TestDocumentAtom { } @Test - public void testMasterPersist() { + void testMasterPersist() { DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length); assertEquals(2L, da.getNotesMasterPersist()); assertEquals(0L, da.getHandoutMasterPersist()); } @Test - public void testSlideDetails() { + void testSlideDetails() { DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length); assertEquals(1, da.getFirstSlideNum()); assertEquals(0, da.getSlideSizeType()); } @Test - public void testBooleans() { + void testBooleans() { DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length); assertFalse(da.getSaveWithFonts()); assertFalse(da.getOmitTitlePlace()); @@ -80,7 +80,7 @@ public final class TestDocumentAtom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); da.writeOut(baos); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExControl.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExControl.java index 8276536a17..c7bd84e116 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExControl.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExControl.java @@ -72,7 +72,7 @@ public final class TestExControl { }; @Test - public void testRead() { + void testRead() { ExControl record = new ExControl(data, 0, data.length); assertEquals(RecordTypes.ExControl.typeID, record.getRecordType()); @@ -91,7 +91,7 @@ public final class TestExControl { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { ExControl record = new ExControl(data, 0, data.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); record.writeOut(baos); @@ -99,7 +99,7 @@ public final class TestExControl { } @Test - public void testNewRecord() throws Exception { + void testNewRecord() throws Exception { ExControl record = new ExControl(); ExControlAtom ctrl = record.getExControlAtom(); ctrl.setSlideId(256); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExHyperlink.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExHyperlink.java index 454b2d3d84..13fea4a83a 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExHyperlink.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExHyperlink.java @@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test; */ public final class TestExHyperlink { @Test - public void testReadWrite() throws IOException { + void testReadWrite() throws IOException { // From a real file byte[] exHyperlinkBytes = org.apache.poi.poifs.storage.RawDataUtil.decompress( "H4sIAAAAAAAAAONnuM6/ggEELvOzAElmMHsXvxuQzGAoAcICBisGfSDMYkhkyAbi"+ @@ -59,7 +59,7 @@ public final class TestExHyperlink { } @Test - public void testRealFile() throws IOException { + void testRealFile() throws IOException { POIDataSamples slTests = POIDataSamples.getSlideShowInstance(); HSLFSlideShowImpl hss = new HSLFSlideShowImpl(slTests.openResourceAsStream("WithLinks.ppt")); HSLFSlideShow ss = new HSLFSlideShow(hss); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExHyperlinkAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExHyperlinkAtom.java index 7e5b45a517..fb8072bd44 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExHyperlinkAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExHyperlinkAtom.java @@ -40,13 +40,13 @@ public class TestExHyperlinkAtom { }; @Test - public void testRecordType() { + void testRecordType() { ExHyperlinkAtom eha = new ExHyperlinkAtom(data_a, 0, data_a.length); assertEquals(4051L, eha.getRecordType()); } @Test - public void testGetNumber() { + void testGetNumber() { ExHyperlinkAtom eha = new ExHyperlinkAtom(data_a, 0, data_a.length); ExHyperlinkAtom ehb = new ExHyperlinkAtom(data_b, 0, data_b.length); @@ -55,7 +55,7 @@ public class TestExHyperlinkAtom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { ExHyperlinkAtom eha = new ExHyperlinkAtom(data_a, 0, data_a.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); eha.writeOut(baos); @@ -64,7 +64,7 @@ public class TestExHyperlinkAtom { // Create A from scratch @Test - public void testCreate() throws Exception { + void testCreate() throws Exception { ExHyperlinkAtom eha = new ExHyperlinkAtom(); // Set value @@ -78,7 +78,7 @@ public class TestExHyperlinkAtom { // Try to turn a into b @Test - public void testChange() throws Exception { + void testChange() throws Exception { ExHyperlinkAtom eha = new ExHyperlinkAtom(data_a, 0, data_a.length); // Change the number diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExMediaAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExMediaAtom.java index 556e0c8efe..5b961d5816 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExMediaAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExMediaAtom.java @@ -37,7 +37,7 @@ public final class TestExMediaAtom { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; @Test - public void testRead() { + void testRead() { ExMediaAtom record = new ExMediaAtom(data, 0, data.length); assertEquals(RecordTypes.ExMediaAtom.typeID, record.getRecordType()); @@ -48,7 +48,7 @@ public final class TestExMediaAtom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { ExMediaAtom record = new ExMediaAtom(data, 0, data.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); record.writeOut(baos); @@ -58,7 +58,7 @@ public final class TestExMediaAtom { } @Test - public void testNewRecord() throws Exception { + void testNewRecord() throws Exception { ExMediaAtom ref = new ExMediaAtom(data, 0, data.length); assertEquals(0, ref.getMask()); // @@ -76,7 +76,7 @@ public final class TestExMediaAtom { } @Test - public void testFlags() { + void testFlags() { ExMediaAtom record = new ExMediaAtom(); //in a new record all the bits are 0 diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExObjList.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExObjList.java index 58290c4c6e..0301b61463 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExObjList.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExObjList.java @@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test; */ public class TestExObjList { @Test - public void testRealFile() throws Exception { + void testRealFile() throws Exception { POIDataSamples slTests = POIDataSamples.getSlideShowInstance(); HSLFSlideShow ss = new HSLFSlideShow(slTests.openResourceAsStream("WithLinks.ppt")); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExObjListAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExObjListAtom.java index 70d0786307..9256b01b9f 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExObjListAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExObjListAtom.java @@ -40,13 +40,13 @@ public class TestExObjListAtom { }; @Test - public void testRecordType() { + void testRecordType() { ExObjListAtom eoa = new ExObjListAtom(data_a, 0, data_a.length); BaseTestNumeric.assertDouble(1034L, eoa.getRecordType()); } @Test - public void testGetSeed() { + void testGetSeed() { ExObjListAtom eoa = new ExObjListAtom(data_a, 0, data_a.length); ExObjListAtom eob = new ExObjListAtom(data_b, 0, data_b.length); @@ -55,7 +55,7 @@ public class TestExObjListAtom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { ExObjListAtom eoa = new ExObjListAtom(data_a, 0, data_a.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); eoa.writeOut(baos); @@ -64,7 +64,7 @@ public class TestExObjListAtom { // Create A from scratch @Test - public void testCreate() throws Exception { + void testCreate() throws Exception { ExObjListAtom eoa = new ExObjListAtom(); // Set seed @@ -78,7 +78,7 @@ public class TestExObjListAtom { // Try to turn a into b @Test - public void testChange() throws Exception { + void testChange() throws Exception { ExObjListAtom eoa = new ExObjListAtom(data_a, 0, data_a.length); // Change the number diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjAtom.java index 6a3f71dcda..4c7771cac8 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjAtom.java @@ -35,7 +35,7 @@ public final class TestExOleObjAtom { 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, (byte)0x96, 0x13, 0x00 }; @Test - public void testRead() { + void testRead() { ExOleObjAtom record = new ExOleObjAtom(data, 0, data.length); assertEquals(RecordTypes.ExOleObjAtom.typeID, record.getRecordType()); @@ -48,7 +48,7 @@ public final class TestExOleObjAtom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { ExOleObjAtom record = new ExOleObjAtom(data, 0, data.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); record.writeOut(baos); @@ -56,7 +56,7 @@ public final class TestExOleObjAtom { } @Test - public void testNewRecord() throws Exception { + void testNewRecord() throws Exception { ExOleObjAtom record = new ExOleObjAtom(); record.setDrawAspect(ExOleObjAtom.DRAW_ASPECT_VISIBLE); record.setType(ExOleObjAtom.TYPE_CONTROL); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjStg.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjStg.java index 61c1debb0f..fcdadfe211 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjStg.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExOleObjStg.java @@ -53,7 +53,7 @@ public final class TestExOleObjStg { } @Test - public void testRead() throws Exception { + void testRead() throws Exception { ExOleObjStg record = new ExOleObjStg(data, 0, data.length); assertEquals(RecordTypes.ExOleObjStg.typeID, record.getRecordType()); @@ -68,7 +68,7 @@ public final class TestExOleObjStg { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { ExOleObjStg record = new ExOleObjStg(data, 0, data.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); record.writeOut(baos); @@ -78,7 +78,7 @@ public final class TestExOleObjStg { } @Test - public void testNewRecord() throws Exception { + void testNewRecord() throws Exception { ExOleObjStg src = new ExOleObjStg(data, 0, data.length); byte[] oledata = readAll(src.getData()); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExVideoContainer.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExVideoContainer.java index 10b4289ce3..2534fddd18 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExVideoContainer.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExVideoContainer.java @@ -51,7 +51,7 @@ public final class TestExVideoContainer { 0x6D, 0x00, 0x70, 0x00, 0x67, 0x00}; @Test - public void testRead() { + void testRead() { ExVideoContainer record = new ExVideoContainer(data, 0, data.length); assertEquals(RecordTypes.ExVideoContainer.typeID, record.getRecordType()); @@ -68,7 +68,7 @@ public final class TestExVideoContainer { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { ExVideoContainer record = new ExVideoContainer(data, 0, data.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); record.writeOut(baos); @@ -76,7 +76,7 @@ public final class TestExVideoContainer { } @Test - public void testNewRecord() throws Exception { + void testNewRecord() throws Exception { ExVideoContainer record = new ExVideoContainer(); record.getExMediaAtom().setObjectId(1); record.getPathAtom().setText("D:\\projects\\SchulerAG\\mcom_v_1_0_4\\view\\data\\tests\\images\\cards.mpg"); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java index ba5ec7f4f4..039f5b98e7 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java @@ -51,7 +51,7 @@ public final class TestFontCollection { } @Test - public void testFonts() { + void testFonts() { FontCollection fonts = new FontCollection(data, 0, data.length); Record[] child = fonts.getChildRecords(); assertEquals(child.length, 1); @@ -61,7 +61,7 @@ public final class TestFontCollection { } @Test - public void testAddFont() { + void testAddFont() { FontCollection fonts = new FontCollection(data, 0, data.length); HSLFFontInfo fi = fonts.addFont(HSLFFontInfoPredefined.TIMES_NEW_ROMAN); assertEquals((int)fi.getIndex(), 0); @@ -85,7 +85,7 @@ public final class TestFontCollection { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { FontCollection fonts = new FontCollection(data, 0, data.length); ByteArrayOutputStream out = new ByteArrayOutputStream(); fonts.writeOut(out); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersAtom.java index 4f15f3d164..3edfadb3de 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersAtom.java @@ -37,7 +37,7 @@ public final class TestHeadersFootersAtom { 0x00, 0x00, 0x23, 0x00 }; @Test - public void testRead() { + void testRead() { HeadersFootersAtom record = new HeadersFootersAtom(data, 0, data.length); assertEquals(RecordTypes.HeadersFootersAtom.typeID, record.getRecordType()); @@ -53,7 +53,7 @@ public final class TestHeadersFootersAtom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { HeadersFootersAtom record = new HeadersFootersAtom(data, 0, data.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); record.writeOut(baos); @@ -61,7 +61,7 @@ public final class TestHeadersFootersAtom { } @Test - public void testNewRecord() throws Exception { + void testNewRecord() throws Exception { HeadersFootersAtom record = new HeadersFootersAtom(); record.setFlag(HeadersFootersAtom.fHasDate, true); record.setFlag(HeadersFootersAtom.fHasTodayDate, true); @@ -73,7 +73,7 @@ public final class TestHeadersFootersAtom { } @Test - public void testFlags() { + void testFlags() { HeadersFootersAtom record = new HeadersFootersAtom(); //in a new record all the bits are 0 diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersContainer.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersContainer.java index 2d94df3cd1..f6a25739b2 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersContainer.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersContainer.java @@ -54,7 +54,7 @@ public final class TestHeadersFootersContainer { }; @Test - public void testReadSlideHeadersFootersContainer() { + void testReadSlideHeadersFootersContainer() { HeadersFootersContainer record = new HeadersFootersContainer(slideData, 0, slideData.length); assertEquals(RecordTypes.HeadersFooters.typeID, record.getRecordType()); assertEquals(HeadersFootersContainer.SlideHeadersFootersContainer, record.getOptions()); @@ -74,7 +74,7 @@ public final class TestHeadersFootersContainer { } @Test - public void testWriteSlideHeadersFootersContainer() throws Exception { + void testWriteSlideHeadersFootersContainer() throws Exception { HeadersFootersContainer record = new HeadersFootersContainer(slideData, 0, slideData.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); record.writeOut(baos); @@ -82,7 +82,7 @@ public final class TestHeadersFootersContainer { } @Test - public void testNewSlideHeadersFootersContainer() throws Exception { + void testNewSlideHeadersFootersContainer() throws Exception { HeadersFootersContainer record = new HeadersFootersContainer(HeadersFootersContainer.SlideHeadersFootersContainer); assertNotNull(record.getHeadersFootersAtom()); @@ -106,7 +106,7 @@ public final class TestHeadersFootersContainer { } @Test - public void testReadNotesHeadersFootersContainer() { + void testReadNotesHeadersFootersContainer() { HeadersFootersContainer record = new HeadersFootersContainer(notesData, 0, notesData.length); assertEquals(RecordTypes.HeadersFooters.typeID, record.getRecordType()); assertEquals(HeadersFootersContainer.NotesHeadersFootersContainer, record.getOptions()); @@ -127,7 +127,7 @@ public final class TestHeadersFootersContainer { } @Test - public void testWriteNotesHeadersFootersContainer() throws Exception { + void testWriteNotesHeadersFootersContainer() throws Exception { HeadersFootersContainer record = new HeadersFootersContainer(notesData, 0, notesData.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); record.writeOut(baos); @@ -135,7 +135,7 @@ public final class TestHeadersFootersContainer { } @Test - public void testNewNotesHeadersFootersContainer() throws Exception { + void testNewNotesHeadersFootersContainer() throws Exception { HeadersFootersContainer record = new HeadersFootersContainer(HeadersFootersContainer.NotesHeadersFootersContainer); assertNotNull(record.getHeadersFootersAtom()); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestInteractiveInfo.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestInteractiveInfo.java index fba0d5802e..7da5ee6f5c 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestInteractiveInfo.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestInteractiveInfo.java @@ -41,13 +41,13 @@ public class TestInteractiveInfo { }; @Test - public void testRecordType() { + void testRecordType() { InteractiveInfo ii = new InteractiveInfo(data_a, 0, data_a.length); assertEquals(4082, ii.getRecordType()); } @Test - public void testGetChildDetails() { + void testGetChildDetails() { InteractiveInfo ii = new InteractiveInfo(data_a, 0, data_a.length); InteractiveInfoAtom ia = ii.getInteractiveInfoAtom(); @@ -55,7 +55,7 @@ public class TestInteractiveInfo { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { InteractiveInfo ii = new InteractiveInfo(data_a, 0, data_a.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ii.writeOut(baos); @@ -64,7 +64,7 @@ public class TestInteractiveInfo { // Create A from scratch @Test - public void testCreate() throws Exception { + void testCreate() throws Exception { InteractiveInfo ii = new InteractiveInfo(); InteractiveInfoAtom ia = ii.getInteractiveInfoAtom(); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestInteractiveInfoAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestInteractiveInfoAtom.java index 3b6f541eba..7f9bcde86e 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestInteractiveInfoAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestInteractiveInfoAtom.java @@ -42,13 +42,13 @@ public class TestInteractiveInfoAtom { }; @Test - public void testRecordType() { + void testRecordType() { InteractiveInfoAtom ia = new InteractiveInfoAtom(data_a, 0, data_a.length); assertEquals(4083L, ia.getRecordType()); } @Test - public void testGetNumber() { + void testGetNumber() { InteractiveInfoAtom ia = new InteractiveInfoAtom(data_a, 0, data_a.length); InteractiveInfoAtom ib = new InteractiveInfoAtom(data_b, 0, data_b.length); @@ -57,7 +57,7 @@ public class TestInteractiveInfoAtom { } @Test - public void testGetRest() { + void testGetRest() { InteractiveInfoAtom ia = new InteractiveInfoAtom(data_a, 0, data_a.length); InteractiveInfoAtom ib = new InteractiveInfoAtom(data_b, 0, data_b.length); @@ -72,7 +72,7 @@ public class TestInteractiveInfoAtom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { InteractiveInfoAtom ia = new InteractiveInfoAtom(data_a, 0, data_a.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ia.writeOut(baos); @@ -81,7 +81,7 @@ public class TestInteractiveInfoAtom { // Create A from scratch @Test - public void testCreate() throws Exception { + void testCreate() throws Exception { InteractiveInfoAtom ia = new InteractiveInfoAtom(); // Set values @@ -98,7 +98,7 @@ public class TestInteractiveInfoAtom { // Try to turn a into b @Test - public void testChange() throws Exception { + void testChange() throws Exception { InteractiveInfoAtom ia = new InteractiveInfoAtom(data_a, 0, data_a.length); // Change the number diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestNotesAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestNotesAtom.java index 8ad95401ed..e2852088dc 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestNotesAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestNotesAtom.java @@ -35,13 +35,13 @@ public final class TestNotesAtom { 0, 0, 0, 0x80-256, 0, 0, 0x0D, 0x30 }; @Test - public void testRecordType() { + void testRecordType() { NotesAtom na = new NotesAtom(data_a, 0, data_a.length); assertEquals(1009L, na.getRecordType()); } @Test - public void testFlags() { + void testFlags() { NotesAtom na = new NotesAtom(data_a, 0, data_a.length); assertEquals(0x80000000, na.getSlideID()); assertFalse(na.getFollowMasterObjects()); @@ -50,7 +50,7 @@ public final class TestNotesAtom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { NotesAtom na = new NotesAtom(data_a, 0, data_a.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); na.writeOut(baos); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordContainer.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordContainer.java index eb16129256..a713ac083d 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordContainer.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordContainer.java @@ -61,12 +61,12 @@ public final class TestRecordContainer { } @Test - public void testIsAnAtom() { + void testIsAnAtom() { assertFalse( recordContainer.isAnAtom() ); } @Test - public void testAppendChildRecord() { + void testAppendChildRecord() { // Grab records for testing with Record r = recordContainer.getChildRecords()[0]; Record rb = recordContainer.getChildRecords()[1]; @@ -100,7 +100,7 @@ public final class TestRecordContainer { } @Test - public void testAddChildAfter() { + void testAddChildAfter() { // Working with new StyleTextPropAtom Record newRecord = new StyleTextPropAtom(0); @@ -130,7 +130,7 @@ public final class TestRecordContainer { } @Test - public void testAddChildBefore() { + void testAddChildBefore() { // Working with new StyleTextPropAtom Record newRecord = new StyleTextPropAtom(0); @@ -171,7 +171,7 @@ public final class TestRecordContainer { } @Test - public void testRemove() { + void testRemove() { Record[] ch = recordContainer.getChildRecords(); Record removeRecord = recordContainer.removeChild(ch[0]); assertSame(ch[0], removeRecord); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordTypes.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordTypes.java index a0af7c8642..869dc427d7 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordTypes.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordTypes.java @@ -28,21 +28,21 @@ import org.junit.jupiter.api.Test; */ public final class TestRecordTypes { @Test - public void testPPTNameLookups() { + void testPPTNameLookups() { assertEquals("MainMaster", RecordTypes.MainMaster.name()); assertEquals("TextBytesAtom", RecordTypes.TextBytesAtom.name()); assertEquals("VBAInfo", RecordTypes.VBAInfo.name()); } @Test - public void testEscherNameLookups() { + void testEscherNameLookups() { assertEquals("DGG_CONTAINER", EscherRecordTypes.DGG_CONTAINER.name()); assertEquals("CLIENT_TEXTBOX", EscherRecordTypes.CLIENT_TEXTBOX.name()); assertEquals("SELECTION", EscherRecordTypes.SELECTION.name()); } @Test - public void testPPTClassLookups() { + void testPPTClassLookups() { // If this record is ever implemented, change to one that isn't! // This is checking the "unhandled default" stuff works assertEquals(RecordTypes.UnknownRecordPlaceholder, RecordTypes.forTypeID(-10)); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSlideAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSlideAtom.java index 23fa873cfa..ef3c7b84b4 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSlideAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSlideAtom.java @@ -41,13 +41,13 @@ public final class TestSlideAtom { 0, 1, 0, 0, 7, 0, 0x0C, 0x30 }; @Test - public void testRecordType() { + void testRecordType() { SlideAtom sa = new SlideAtom(data_a, 0, data_a.length); assertEquals(1007l, sa.getRecordType()); } @Test - public void testFlags() { + void testFlags() { SlideAtom sa = new SlideAtom(data_a, 0, data_a.length); // First 12 bytes are a SSlideLayoutAtom, checked elsewhere @@ -63,7 +63,7 @@ public final class TestSlideAtom { } @Test - public void testSSlideLayoutAtom() { + void testSSlideLayoutAtom() { SlideAtom sa = new SlideAtom(data_a, 0, data_a.length); SlideAtomLayout ssla = sa.getSSlideLayoutAtom(); @@ -73,7 +73,7 @@ public final class TestSlideAtom { } @Test - public void testWrite() throws IOException { + void testWrite() throws IOException { SlideAtom sa = new SlideAtom(data_a, 0, data_a.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); sa.writeOut(baos); @@ -81,7 +81,7 @@ public final class TestSlideAtom { } @Test - public void testSSSlideInfoAtom() throws IOException { + void testSSSlideInfoAtom() throws IOException { HSLFSlideShow ss1 = new HSLFSlideShow(); HSLFSlide slide1 = ss1.createSlide(), slide2 = ss1.createSlide(); slide2.setHidden(true); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSlidePersistAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSlidePersistAtom.java index 79abd72937..2a638d5a9a 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSlidePersistAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSlidePersistAtom.java @@ -36,13 +36,13 @@ public final class TestSlidePersistAtom { 1, 0, 0, 0, 0, 0, 0 }; @Test - public void testRecordType() { + void testRecordType() { SlidePersistAtom spa = new SlidePersistAtom(data_a, 0, data_a.length); assertEquals(1011L, spa.getRecordType()); } @Test - public void testFlags() { + void testFlags() { SlidePersistAtom spa = new SlidePersistAtom(data_a, 0, data_a.length); assertEquals(4, spa.getRefID() ); assertTrue(spa.getHasShapesOtherThanPlaceholders()); @@ -51,7 +51,7 @@ public final class TestSlidePersistAtom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { SlidePersistAtom spa = new SlidePersistAtom(data_a, 0, data_a.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); spa.writeOut(baos); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSound.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSound.java index 9a6f3b12f8..4bfbc23526 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSound.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSound.java @@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test; */ public final class TestSound { @Test - public void testRealFile() throws IOException { + void testRealFile() throws IOException { POIDataSamples slTests = POIDataSamples.getSlideShowInstance(); HSLFSlideShow ppt = new HSLFSlideShow(slTests.openResourceAsStream("sound.ppt")); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestStyleTextPropAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestStyleTextPropAtom.java index f52c11c9f5..b8117a38a7 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestStyleTextPropAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestStyleTextPropAtom.java @@ -139,7 +139,7 @@ public final class TestStyleTextPropAtom { private static final int data_d_text_len = 0xA0-1; @Test - public void testRecordType() { + void testRecordType() { StyleTextPropAtom stpa = new StyleTextPropAtom(data_a,0,data_a.length); StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length); StyleTextPropAtom stpc = new StyleTextPropAtom(data_c,0,data_c.length); @@ -150,7 +150,7 @@ public final class TestStyleTextPropAtom { @Test - public void testCharacterStyleCounts() { + void testCharacterStyleCounts() { StyleTextPropAtom stpa = new StyleTextPropAtom(data_a,0,data_a.length); StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length); @@ -165,7 +165,7 @@ public final class TestStyleTextPropAtom { } @Test - public void testParagraphStyleCounts() { + void testParagraphStyleCounts() { StyleTextPropAtom stpa = new StyleTextPropAtom(data_a,0,data_a.length); StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length); @@ -181,7 +181,7 @@ public final class TestStyleTextPropAtom { @Test - public void testCharacterStyleLengths() { + void testCharacterStyleLengths() { StyleTextPropAtom stpa = new StyleTextPropAtom(data_a,0,data_a.length); StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length); @@ -212,7 +212,7 @@ public final class TestStyleTextPropAtom { @Test - public void testCharacterPropOrdering() { + void testCharacterPropOrdering() { StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length); stpb.setParentTextSize(data_b_text_len); @@ -260,7 +260,7 @@ public final class TestStyleTextPropAtom { } @Test - public void testParagraphProps() { + void testParagraphProps() { StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length); stpb.setParentTextSize(data_b_text_len); @@ -305,7 +305,7 @@ public final class TestStyleTextPropAtom { } @Test - public void testCharacterProps() { + void testCharacterProps() { StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length); stpb.setParentTextSize(data_b_text_len); @@ -377,7 +377,7 @@ public final class TestStyleTextPropAtom { } @Test - public void testFindAddTextProp() { + void testFindAddTextProp() { StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length); stpb.setParentTextSize(data_b_text_len); @@ -437,7 +437,7 @@ public final class TestStyleTextPropAtom { * constructor, and setting the required properties */ @Test - public void testCreateAFromScatch() throws Exception { + void testCreateAFromScatch() throws Exception { // Start with an empty one StyleTextPropAtom stpa = new StyleTextPropAtom(54); @@ -475,7 +475,7 @@ public final class TestStyleTextPropAtom { * constructor, and setting the required properties */ @Test - public void testCreateBFromScatch() throws Exception { + void testCreateBFromScatch() throws Exception { // Start with an empty one StyleTextPropAtom stpa = new StyleTextPropAtom(data_b_text_len); @@ -645,28 +645,28 @@ public final class TestStyleTextPropAtom { } @Test - public void testWriteA() throws IOException { + void testWriteA() throws IOException { doReadWrite(data_a, -1); } @Test - public void testLoadWriteA() throws IOException { + void testLoadWriteA() throws IOException { doReadWrite(data_b, data_b_text_len); } @Test - public void testWriteB() throws IOException { + void testWriteB() throws IOException { doReadWrite(data_b, -1); } @Test - public void testLoadWriteB() throws IOException { + void testLoadWriteB() throws IOException { doReadWrite(data_b, data_b_text_len); } @Test - public void testLoadWriteC() throws IOException { + void testLoadWriteC() throws IOException { // BitMaskTextProperties will sanitize the output byte[] expected = data_c.clone(); expected[56] = 0; @@ -675,7 +675,7 @@ public final class TestStyleTextPropAtom { } @Test - public void testLoadWriteD() throws IOException { + void testLoadWriteD() throws IOException { doReadWrite(data_d, data_d_text_len); } @@ -697,7 +697,7 @@ public final class TestStyleTextPropAtom { } @Test - public void testNotEnoughDataProp() { + void testNotEnoughDataProp() { // We don't have enough data in the record to cover // all the properties the mask says we have // Make sure we just do the best we can @@ -711,7 +711,7 @@ public final class TestStyleTextPropAtom { * Check the test data for Bug 40143. */ @Test - public void testBug40143() { + void testBug40143() { StyleTextPropAtom atom = new StyleTextPropAtom(data_d, 0, data_d.length); atom.setParentTextSize(data_d_text_len); @@ -734,7 +734,7 @@ public final class TestStyleTextPropAtom { * Check the test data for Bug 42677. */ @Test - public void test42677() throws IOException { + void test42677() throws IOException { int length = 18; byte[] data = { 0x00, 0x00, (byte)0xA1, 0x0F, 0x28, 0x00, 0x00, 0x00, @@ -760,7 +760,7 @@ public final class TestStyleTextPropAtom { * */ @Test - public void test45815() throws IOException { + void test45815() throws IOException { int length = 19; byte[] data = { 0x00, 0x00, (byte)0xA1, 0x0F, 0x5E, 0x00, 0x00, 0x00, 0x14, 0x00, diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextBytesAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextBytesAtom.java index 864e330570..44f2dc4617 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextBytesAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextBytesAtom.java @@ -41,26 +41,26 @@ public final class TestTextBytesAtom { private final String alt_text = "This is a test title"; @Test - public void testRecordType() { + void testRecordType() { TextBytesAtom tba = new TextBytesAtom(data,0,data.length); assertEquals(4008L, tba.getRecordType()); } @Test - public void testTextA() { + void testTextA() { TextBytesAtom tba = new TextBytesAtom(data,0,data.length); String data_text = "This is the title on page 2"; assertEquals(data_text, tba.getText()); } @Test - public void testTextB() { + void testTextB() { TextBytesAtom tba = new TextBytesAtom(alt_data,0,alt_data.length); assertEquals(alt_text, tba.getText()); } @Test - public void testChangeText() throws Exception { + void testChangeText() throws Exception { TextBytesAtom tba = new TextBytesAtom(data,0,data.length); tba.setText(alt_text.getBytes(StandardCharsets.ISO_8859_1)); @@ -70,7 +70,7 @@ public final class TestTextBytesAtom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { TextBytesAtom tba = new TextBytesAtom(data,0,data.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); tba.writeOut(baos); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextCharsAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextCharsAtom.java index 8fb3ba662a..4c1a71daa0 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextCharsAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextCharsAtom.java @@ -38,25 +38,25 @@ public final class TestTextCharsAtom { private final String alt_text = "This\u01A3"; @Test - public void testRecordType() { + void testRecordType() { TextCharsAtom tca = new TextCharsAtom(data,0,data.length); assertEquals(4000L, tca.getRecordType()); } @Test - public void testTextA() { + void testTextA() { TextCharsAtom tca = new TextCharsAtom(data,0,data.length); assertEquals(data_text, tca.getText()); } @Test - public void testTextB() { + void testTextB() { TextCharsAtom tca = new TextCharsAtom(alt_data,0,alt_data.length); assertEquals(alt_text, tca.getText()); } @Test - public void testChangeText() throws Exception { + void testChangeText() throws Exception { TextCharsAtom tca = new TextCharsAtom(data,0,data.length); tca.setText(alt_text); @@ -66,7 +66,7 @@ public final class TestTextCharsAtom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { TextCharsAtom tca = new TextCharsAtom(data,0,data.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); tca.writeOut(baos); @@ -74,7 +74,7 @@ public final class TestTextCharsAtom { } @Test - public void testCreateNew() throws Exception { + void testCreateNew() throws Exception { TextCharsAtom tca = new TextCharsAtom(); assertEquals(0, tca.getText().length()); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextHeaderAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextHeaderAtom.java index d28af3f7fe..4935940afb 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextHeaderAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextHeaderAtom.java @@ -36,13 +36,13 @@ public final class TestTextHeaderAtom { private final byte[] body_data = { 0, 0, 0x9f-256, 0x0f, 4, 0, 0, 0, 1, 0, 0, 0 }; @Test - public void testRecordType() { + void testRecordType() { TextHeaderAtom tha = new TextHeaderAtom(notes_data,0,12); assertEquals(3999L, tha.getRecordType()); } @Test - public void testTypes() { + void testTypes() { TextHeaderAtom n_tha = new TextHeaderAtom(notes_data,0,12); TextHeaderAtom t_tha = new TextHeaderAtom(title_data,0,12); TextHeaderAtom b_tha = new TextHeaderAtom(body_data,0,12); @@ -52,7 +52,7 @@ public final class TestTextHeaderAtom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { TextHeaderAtom tha = new TextHeaderAtom(notes_data,0,12); ByteArrayOutputStream baos = new ByteArrayOutputStream(); tha.writeOut(baos); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextRulerAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextRulerAtom.java index cee16c5d07..e50419c410 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextRulerAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextRulerAtom.java @@ -43,7 +43,7 @@ public final class TestTextRulerAtom { }; @Test - public void testReadRuler() { + void testReadRuler() { TextRulerAtom ruler = new TextRulerAtom(data_1, 0, data_1.length); assertEquals(ruler.getNumberOfLevels(), 0); assertEquals(ruler.getDefaultTabSize(), 0); @@ -59,7 +59,7 @@ public final class TestTextRulerAtom { } @Test - public void testWriteRuler() throws Exception { + void testWriteRuler() throws Exception { TextRulerAtom ruler = new TextRulerAtom(data_1, 0, data_1.length); ByteArrayOutputStream out = new ByteArrayOutputStream(); ruler.writeOut(out); @@ -69,7 +69,7 @@ public final class TestTextRulerAtom { } @Test - public void testRead2() throws Exception { + void testRead2() throws Exception { TextRulerAtom ruler = TextRulerAtom.getParagraphInstance(); ruler.setParagraphIndent((short)249, (short)321); ByteArrayOutputStream out = new ByteArrayOutputStream(); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextSpecInfoAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextSpecInfoAtom.java index 56f841ceb9..578c6eef89 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextSpecInfoAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextSpecInfoAtom.java @@ -41,7 +41,7 @@ public final class TestTextSpecInfoAtom { }; @Test - public void testRead() { + void testRead() { TextSpecInfoAtom spec = new TextSpecInfoAtom(data_1, 0, data_1.length); TextSpecInfoRun[] run = spec.getTextSpecInfoRuns(); assertEquals(5, run.length); @@ -54,7 +54,7 @@ public final class TestTextSpecInfoAtom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { TextSpecInfoAtom spec = new TextSpecInfoAtom(data_1, 0, data_1.length); ByteArrayOutputStream out = new ByteArrayOutputStream(); spec.writeOut(out); @@ -62,7 +62,7 @@ public final class TestTextSpecInfoAtom { } @Test - public void testReset() throws Exception { + void testReset() throws Exception { TextSpecInfoAtom spec = new TextSpecInfoAtom(data_1, 0, data_1.length); spec.reset(32); //length of the parent text diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxInteractiveInfoAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxInteractiveInfoAtom.java index bc28ea9a79..12874ec041 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxInteractiveInfoAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxInteractiveInfoAtom.java @@ -41,7 +41,7 @@ public final class TestTxInteractiveInfoAtom { }; @Test - public void testRead() { + void testRead() { TxInteractiveInfoAtom ia1 = new TxInteractiveInfoAtom(data_a, 0, data_a.length); assertEquals(4063, ia1.getRecordType()); @@ -56,7 +56,7 @@ public final class TestTxInteractiveInfoAtom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { TxInteractiveInfoAtom atom = new TxInteractiveInfoAtom(data_a, 0, data_a.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); atom.writeOut(baos); @@ -65,7 +65,7 @@ public final class TestTxInteractiveInfoAtom { // Create A from scratch @Test - public void testCreate() throws Exception { + void testCreate() throws Exception { TxInteractiveInfoAtom ia = new TxInteractiveInfoAtom(); // Set values @@ -80,7 +80,7 @@ public final class TestTxInteractiveInfoAtom { // Try to turn a into b @Test - public void testChange() throws Exception { + void testChange() throws Exception { TxInteractiveInfoAtom ia = new TxInteractiveInfoAtom(data_a, 0, data_a.length); // Change the number diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java index 68173a50cd..66db974066 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java @@ -47,7 +47,7 @@ public final class TestTxMasterStyleAtom { } @Test - public void testDefaultStyles() { + void testDefaultStyles() { TxMasterStyleAtom[] txmaster = getMasterStyles(); for (final TxMasterStyleAtom atom : txmaster) { final int txtype = atom.getTextType(); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestUserEditAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestUserEditAtom.java index 05b43c1d70..c09e1e55b3 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestUserEditAtom.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestUserEditAtom.java @@ -36,13 +36,13 @@ public final class TestUserEditAtom { 5, 0, 0, 0, 1, 0, 0xF6-256, 77 }; @Test - public void testRecordType() { + void testRecordType() { UserEditAtom uea = new UserEditAtom(data_a, 0, data_a.length); assertEquals(4085L, uea.getRecordType()); } @Test - public void testFlags() { + void testFlags() { UserEditAtom uea = new UserEditAtom(data_a, 0, data_a.length); assertEquals(256, uea.getLastViewedSlideID() ); @@ -55,7 +55,7 @@ public final class TestUserEditAtom { } @Test - public void testWrite() throws Exception { + void testWrite() throws Exception { UserEditAtom uea = new UserEditAtom(data_a, 0, data_a.length); ByteArrayOutputStream baos = new ByteArrayOutputStream(); uea.writeOut(baos); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java index 8edabe0cb1..c786196769 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java @@ -70,7 +70,7 @@ public final class TestAddingSlides { * Test adding a slide to an empty slideshow */ @Test - public void testAddSlideToEmpty() throws IOException { + void testAddSlideToEmpty() throws IOException { // Doesn't have any slides assertEquals(0, ss_empty.getSlides().size()); @@ -119,7 +119,7 @@ public final class TestAddingSlides { * Test adding a slide to an existing slideshow */ @Test - public void testAddSlideToExisting() throws IOException { + void testAddSlideToExisting() throws IOException { // Has one slide assertEquals(1, ss_one.getSlides().size()); HSLFSlide s1 = ss_one.getSlides().get(0); @@ -165,7 +165,7 @@ public final class TestAddingSlides { * Test adding a slide to an existing slideshow, with two slides already */ @Test - public void testAddSlideToExisting2() throws IOException { + void testAddSlideToExisting2() throws IOException { // grab UserEditAtom UserEditAtom usredit = null; Record[] _records = ss_two.getSlideShowImpl().getRecords(); @@ -224,7 +224,7 @@ public final class TestAddingSlides { * Test SlideShow#removeSlide */ @Test - public void testRemoving() throws IOException { + void testRemoving() throws IOException { HSLFSlide slide1 = ss_empty.createSlide(); HSLFSlide slide2 = ss_empty.createSlide(); @@ -249,7 +249,7 @@ public final class TestAddingSlides { } @Test - public void test47261() throws IOException { + void test47261() throws IOException { HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("47261.ppt"); List slides = ppt.getSlides(); Document doc = ppt.getDocumentRecord(); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestCounts.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestCounts.java index 647ce3dbd5..d4dce2b13f 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestCounts.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestCounts.java @@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test; */ public final class TestCounts { @Test - public void testSheetsCount() throws IOException { + void testSheetsCount() throws IOException { HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("basic_test_ppt_file.ppt"); List slides = ppt.getSlides(); @@ -54,7 +54,7 @@ public final class TestCounts { } @Test - public void testNotesCount() throws IOException { + void testNotesCount() throws IOException { HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("basic_test_ppt_file.ppt"); List notes = ppt.getNotes(); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestHSLFSlideShowFactory.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestHSLFSlideShowFactory.java index 22058e22e1..d82c659d71 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestHSLFSlideShowFactory.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestHSLFSlideShowFactory.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test; public final class TestHSLFSlideShowFactory extends BaseTestSlideShowFactory { @Test - public void testFactory() throws Exception { + void testFactory() throws Exception { testFactory("pictures.ppt", "Password_Protected-hello.ppt", "hello"); } } diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestMostRecentRecords.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestMostRecentRecords.java index 0f4db784ff..fabe1733ab 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestMostRecentRecords.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestMostRecentRecords.java @@ -41,7 +41,7 @@ public final class TestMostRecentRecords { } @Test - public void testCount() { + void testCount() { // Most recent core records org.apache.poi.hslf.record.Record[] mrcr = ss.getMostRecentCoreRecords(); @@ -50,7 +50,7 @@ public final class TestMostRecentRecords { } @Test - public void testRightRecordTypes() { + void testRightRecordTypes() { // Most recent core records org.apache.poi.hslf.record.Record[] mrcr = ss.getMostRecentCoreRecords(); @@ -72,7 +72,7 @@ public final class TestMostRecentRecords { } @Test - public void testCorrectRecords() { + void testCorrectRecords() { // Most recent core records org.apache.poi.hslf.record.Record[] mrcr = ss.getMostRecentCoreRecords(); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java index 7ad10ab71f..93791bebb2 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java @@ -39,14 +39,14 @@ public final class TestNotesText { } @Test - public void testNotesOne() { + void testNotesOne() { HSLFNotes notes = ss.getNotes().get(0); String[] expectText = {"These are the notes for page 1"}; assertArrayEquals(expectText, toStrings(notes)); } @Test - public void testNotesTwo() { + void testNotesTwo() { HSLFNotes notes = ss.getNotes().get(1); String[] expectText = {"These are the notes on page two, again lacking formatting"}; assertArrayEquals(expectText, toStrings(notes)); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNumberedList.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNumberedList.java index 6cae0d00e1..6591a13ac7 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNumberedList.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNumberedList.java @@ -46,7 +46,7 @@ public final class TestNumberedList { private static POIDataSamples _slTests = POIDataSamples.getSlideShowInstance(); @Test - public void testNumberedList() throws Exception { + void testNumberedList() throws Exception { HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("numbers.ppt")); final List slides = ppt.getSlides(); assertEquals(2, slides.size()); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNumberedList2.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNumberedList2.java index 493b60dc27..6e49fd10d7 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNumberedList2.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNumberedList2.java @@ -47,7 +47,7 @@ public final class TestNumberedList2 { private static final POIDataSamples _slTests = POIDataSamples.getSlideShowInstance(); @Test - public void testNumberedList() throws IOException { + void testNumberedList() throws IOException { try (HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("numbers2.ppt"))) { final List slides = ppt.getSlides(); assertEquals(2, slides.size()); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNumberedList3.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNumberedList3.java index 1dcc249584..6aa90ff6d9 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNumberedList3.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNumberedList3.java @@ -50,7 +50,7 @@ public final class TestNumberedList3 { private static final POIDataSamples _slTests = POIDataSamples.getSlideShowInstance(); @Test - public void testNumberedList() throws IOException { + void testNumberedList() throws IOException { try (HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("numbers3.ppt"))) { final List slides = ppt.getSlides(); assertEquals(1, slides.size()); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java index 5142a5638d..fce2e1804d 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java @@ -57,7 +57,7 @@ public final class TestPictures { * Test read/write Macintosh PICT */ @Test - public void testPICT() throws IOException { + void testPICT() throws IOException { HSLFSlideShow ppt = new HSLFSlideShow(); HSLFSlide slide = ppt.createSlide(); @@ -118,7 +118,7 @@ public final class TestPictures { * Test read/write WMF */ @Test - public void testWMF() throws IOException { + void testWMF() throws IOException { HSLFSlideShow ppt = new HSLFSlideShow(); HSLFSlide slide = ppt.createSlide(); @@ -178,7 +178,7 @@ public final class TestPictures { * Test read/write EMF */ @Test - public void testEMF() throws IOException { + void testEMF() throws IOException { HSLFSlideShow ppt = new HSLFSlideShow(); HSLFSlide slide = ppt.createSlide(); @@ -235,7 +235,7 @@ public final class TestPictures { * Test read/write PNG */ @Test - public void testPNG() throws IOException { + void testPNG() throws IOException { HSLFSlideShow ppt = new HSLFSlideShow(); HSLFSlide slide = ppt.createSlide(); @@ -275,7 +275,7 @@ public final class TestPictures { * Test read/write JPEG */ @Test - public void testJPEG() throws IOException { + void testJPEG() throws IOException { HSLFSlideShow ppt = new HSLFSlideShow(); HSLFSlide slide = ppt.createSlide(); @@ -316,7 +316,7 @@ public final class TestPictures { * Test read/write DIB */ @Test - public void testDIB() throws IOException { + void testDIB() throws IOException { HSLFSlideShow ppt = new HSLFSlideShow(); HSLFSlide slide = ppt.createSlide(); @@ -356,7 +356,7 @@ public final class TestPictures { * Read pictures in different formats from a reference slide show */ @Test - public void testReadPictures() throws IOException { + void testReadPictures() throws IOException { byte[] src_bytes, ppt_bytes, b1, b2; HSLFPictureShape pict; @@ -423,7 +423,7 @@ public final class TestPictures { * crazy pictures of type 0, we do our best. */ @Test - public void testZeroPictureType() throws IOException { + void testZeroPictureType() throws IOException { HSLFSlideShowImpl hslf = new HSLFSlideShowImpl(slTests.openResourceAsStream("PictureTypeZero.ppt")); // Should still have 2 real pictures @@ -462,7 +462,7 @@ public final class TestPictures { @Test @Disabled("requires an internet connection to a 3rd party site") // As of 2017-06-20, the file still exists at the specified URL and the test passes. - public void testZeroPictureLength() throws IOException { + void testZeroPictureLength() throws IOException { // take the data from www instead of test directory URL url = new URL("http://www.cs.sfu.ca/~anoop/courses/CMPT-882-Fall-2002/chris.ppt"); HSLFSlideShowImpl hslf = new HSLFSlideShowImpl(url.openStream()); @@ -522,7 +522,7 @@ public final class TestPictures { } @Test - public void testGetPictureName() throws IOException { + void testGetPictureName() throws IOException { HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("ppt_with_png.ppt"); HSLFSlide slide = ppt.getSlides().get(0); @@ -532,7 +532,7 @@ public final class TestPictures { } @Test - public void testSetPictureName() throws IOException { + void testSetPictureName() throws IOException { HSLFSlideShow ppt = new HSLFSlideShow(); HSLFSlide slide = ppt.createSlide(); @@ -554,7 +554,7 @@ public final class TestPictures { } @Test - public void testPictureIndexIsOneBased() throws IOException { + void testPictureIndexIsOneBased() throws IOException { try (HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("ppt_with_png.ppt")) { HSLFPictureData picture = ppt.getPictureData().get(0); assertEquals(1, picture.getIndex()); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestReOrderingSlides.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestReOrderingSlides.java index ef25304b64..065234594b 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestReOrderingSlides.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestReOrderingSlides.java @@ -64,7 +64,7 @@ public final class TestReOrderingSlides { * Test that we can "re-order" a slideshow with only 1 slide on it */ @Test - public void testReOrder1() throws IOException { + void testReOrder1() throws IOException { // Has one slide assertEquals(1, ss_one.getSlides().size()); HSLFSlide s1 = ss_one.getSlides().get(0); @@ -97,7 +97,7 @@ public final class TestReOrderingSlides { * two slides in it */ @Test - public void testReOrder2() throws IOException { + void testReOrder2() throws IOException { // Has two slides assertEquals(2, ss_two.getSlides().size()); HSLFSlide s1 = ss_two.getSlides().get(0); @@ -138,7 +138,7 @@ public final class TestReOrderingSlides { * Test re-ordering slides in a slideshow with 2 slides on it */ @Test - public void testReOrder2swap() throws IOException { + void testReOrder2swap() throws IOException { // Has two slides assertEquals(2, ss_two.getSlides().size()); HSLFSlide s1 = ss_two.getSlides().get(0); @@ -180,7 +180,7 @@ public final class TestReOrderingSlides { * three slides in it */ @Test - public void testReOrder3() throws IOException { + void testReOrder3() throws IOException { // Has three slides assertEquals(3, ss_three.getSlides().size()); HSLFSlide s1 = ss_three.getSlides().get(0); @@ -231,7 +231,7 @@ public final class TestReOrderingSlides { * Test re-ordering slides in a slideshow with 3 slides on it */ @Test - public void testReOrder3swap() throws IOException { + void testReOrder3swap() throws IOException { // Has three slides assertEquals(3, ss_three.getSlides().size()); HSLFSlide s1 = ss_three.getSlides().get(0); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRecordSetup.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRecordSetup.java index b66f8bc71f..dc8f80f085 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRecordSetup.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRecordSetup.java @@ -45,7 +45,7 @@ public final class TestRecordSetup { } @Test - public void testHandleParentAwareRecords() { + void testHandleParentAwareRecords() { org.apache.poi.hslf.record.Record[] records = hss.getRecords(); for ( org.apache.poi.hslf.record.Record record : records) { ensureParentAware(record,null); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java index 89af70851c..9a303e239f 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java @@ -87,7 +87,7 @@ public final class TestRichTextRun { * on a non rich text run */ @Test - public void testBoldNonRich() { + void testBoldNonRich() { HSLFSlide slideOne = ss.getSlides().get(0); List> textParass = slideOne.getTextParagraphs(); List textParas = textParass.get(0); @@ -118,7 +118,7 @@ public final class TestRichTextRun { * on a rich text run */ @Test - public void testBoldRich() { + void testBoldRich() { HSLFSlide slideOneR = ssRichA.getSlides().get(0); List> textParass = slideOneR.getTextParagraphs(); List textParas = textParass.get(1); @@ -146,7 +146,7 @@ public final class TestRichTextRun { * rich text runs */ @Test - public void testFontSize() { + void testFontSize() { HSLFSlide slideOne = ss.getSlides().get(0); List> textParass = slideOne.getTextParagraphs(); @@ -211,7 +211,7 @@ public final class TestRichTextRun { } @Test - public void testChangeWriteRead() throws IOException { + void testChangeWriteRead() throws IOException { for(HSLFSlideShow h : new HSLFSlideShow[] { ss, ssRichA, ssRichB }) { // Change HSLFSlide slideOne = h.getSlides().get(0); @@ -262,7 +262,7 @@ public final class TestRichTextRun { * run out before the character styles do */ @Test - public void testParagraphStylesShorterTheCharStyles() { + void testParagraphStylesShorterTheCharStyles() { // Check we have the right number of sheets List slides = ssRichC.getSlides(); assertEquals(14, slides.size()); @@ -322,7 +322,7 @@ public final class TestRichTextRun { */ @Test @SuppressWarnings("unused") - public void testParagraphStylesShorterTheCharStylesWrite() throws IOException { + void testParagraphStylesShorterTheCharStylesWrite() throws IOException { assertMatchesSLTWC(ssRichC); assertMatchesFileC(ssRichC); @@ -430,7 +430,7 @@ public final class TestRichTextRun { } @Test - public void testIndentationLevel() throws Exception { + void testIndentationLevel() throws Exception { HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("ParagraphStylesShorterThanCharStyles.ppt"); for (HSLFSlide sl : ppt.getSlides()) { for (List txt : sl.getTextParagraphs()) { @@ -445,7 +445,7 @@ public final class TestRichTextRun { } @Test - public void testReadParagraphStyles() throws Exception { + void testReadParagraphStyles() throws Exception { try (HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("bullets.ppt")) { HSLFTextParagraph rt; List> txt; @@ -501,7 +501,7 @@ public final class TestRichTextRun { } @Test - public void testSetParagraphStyles() throws IOException { + void testSetParagraphStyles() throws IOException { HSLFSlideShow ppt1 = new HSLFSlideShow(); HSLFSlide slide = ppt1.createSlide(); @@ -553,7 +553,7 @@ public final class TestRichTextRun { } @Test - public void testAddText() throws Exception { + void testAddText() throws Exception { try (HSLFSlideShow ppt1 = HSLFTestDataSamples.getSlideShow("bullets.ppt")) { HSLFTextParagraph rt; @@ -628,7 +628,7 @@ public final class TestRichTextRun { } @Test - public void testChineseParagraphs() { + void testChineseParagraphs() { List rts; HSLFTextRun rt; List> txt; diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSheetText.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSheetText.java index c46dd87f0c..2fc953992c 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSheetText.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSheetText.java @@ -45,7 +45,7 @@ public final class TestSheetText { } @Test - public void testSheetOne() { + void testSheetOne() { HSLFSheet slideOne = ss.getSlides().get(0); String[] expectText = new String[] {"This is a test title","This is a test subtitle\rThis is on page 1"}; @@ -56,7 +56,7 @@ public final class TestSheetText { } } - public void testSheetTwo() { + void testSheetTwo() { HSLFSheet slideTwo = ss.getSlides().get(1); String[] expectText = new String[] {"This is the title on page 2","This is page two\rIt has several blocks of text\rNone of them have formatting"}; assertEquals(expectText.length, slideTwo.getTextParagraphs().size()); @@ -71,7 +71,7 @@ public final class TestSheetText { * TextProps don't have enough data. * (Make sure we don't screw up / throw an exception etc) */ - public void testWithShortTextPropData() throws IOException { + void testWithShortTextPropData() throws IOException { HSLFSlideShow sss = HSLFTestDataSamples.getSlideShow("iisd_report.ppt"); // Should come out with 10 slides, no notes diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSlideOrdering.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSlideOrdering.java index ccd3d90ee6..1d7725604d 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSlideOrdering.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSlideOrdering.java @@ -52,7 +52,7 @@ public final class TestSlideOrdering { * Test the simple case - record order matches slide order */ @Test - public void testSimpleCase() { + void testSimpleCase() { assertEquals(2, ssA.getSlides().size()); HSLFSlide s1 = ssA.getSlides().get(0); @@ -68,7 +68,7 @@ public final class TestSlideOrdering { * Test the complex case - record order differs from slide order */ @Test - public void testComplexCase() { + void testComplexCase() { assertEquals(3, ssB.getSlides().size()); int i=1; for (HSLFSlide s : ssB.getSlides()) { @@ -97,7 +97,7 @@ public final class TestSlideOrdering { } @Test - public void testTitles() throws Exception { + void testTitles() throws Exception { assertSlideOrdering("basic_test_ppt_file.ppt", new String[] { "This is a test title", "This is the title on page 2" }); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSoundData.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSoundData.java index 112e35fbe0..3ac70bd00d 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSoundData.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSoundData.java @@ -31,7 +31,7 @@ public final class TestSoundData { * Read a reference sound file from disk and compare it from the data extracted from the slide show */ @Test - public void testSounds() throws Exception { + void testSounds() throws Exception { //read the reference sound file byte[] ref_data = HSLFTestDataSamples.getTestDataFileContent("ringin.wav"); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTable.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTable.java index 40d7749af8..0e5757051e 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTable.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTable.java @@ -68,7 +68,7 @@ public class TestTable { } @Test - public void testTable() throws IOException { + void testTable() throws IOException { try (HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("54111.ppt")) { List slides = ppt.getSlides(); assertEquals(1, slides.size()); @@ -107,7 +107,7 @@ public class TestTable { } @Test - public void testAddText() throws IOException { + void testAddText() throws IOException { HSLFSlideShow ppt1 = new HSLFSlideShow(); HSLFSlide slide = ppt1.createSlide(); HSLFTable tab = slide.createTable(4, 5); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextRun.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextRun.java index 254ef9218f..0f3b79f3a8 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextRun.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextRun.java @@ -66,7 +66,7 @@ public final class TestTextRun { * Test to ensure that getting the text works correctly */ @Test - public void testGetText() { + void testGetText() { HSLFSlide slideOne = ss.getSlides().get(0); List> textParas = slideOne.getTextParagraphs(); @@ -96,7 +96,7 @@ public final class TestTextRun { * Test to ensure changing non rich text bytes->bytes works correctly */ @Test - public void testSetText() { + void testSetText() { HSLFSlide slideOne = ss.getSlides().get(0); List> textRuns = slideOne.getTextParagraphs(); HSLFTextParagraph run = textRuns.get(0).get(0); @@ -121,7 +121,7 @@ public final class TestTextRun { */ @SuppressWarnings("unused") @Test - public void testAdvancedSetText() { + void testAdvancedSetText() { HSLFSlide slideOne = ss.getSlides().get(0); List paras = slideOne.getTextParagraphs().get(0); HSLFTextParagraph para = paras.get(0); @@ -196,7 +196,7 @@ public final class TestTextRun { * set up for it */ @Test - public void testGetRichTextNonRich() { + void testGetRichTextNonRich() { HSLFSlide slideOne = ss.getSlides().get(0); List> textParass = slideOne.getTextParagraphs(); @@ -219,7 +219,7 @@ public final class TestTextRun { * Tests to ensure that the rich text runs are built up correctly */ @Test - public void testGetRichText() { + void testGetRichText() { HSLFSlide slideOne = ssRich.getSlides().get(0); List> textParass = slideOne.getTextParagraphs(); @@ -258,7 +258,7 @@ public final class TestTextRun { * ensuring that everything stays with the same default styling */ @Test - public void testSetTextWhereNotRich() { + void testSetTextWhereNotRich() { HSLFSlide slideOne = ss.getSlides().get(0); List> textParass = slideOne.getTextParagraphs(); List trB = textParass.get(0); @@ -279,7 +279,7 @@ public final class TestTextRun { * sets everything to the same styling */ @Test - public void testSetTextWhereRich() { + void testSetTextWhereRich() { HSLFSlide slideOne = ssRich.getSlides().get(0); List> textParass = slideOne.getTextParagraphs(); List trB = textParass.get(1); @@ -328,7 +328,7 @@ public final class TestTextRun { * in a rich text run, that doesn't happen to actually be rich */ @Test - public void testChangeTextInRichTextRunNonRich() { + void testChangeTextInRichTextRunNonRich() { HSLFSlide slideOne = ss.getSlides().get(0); List> textRuns = slideOne.getTextParagraphs(); List trB = textRuns.get(1); @@ -354,7 +354,7 @@ public final class TestTextRun { * correctly */ @Test - public void testChangeTextInRichTextRun() { + void testChangeTextInRichTextRun() { HSLFSlide slideOne = ssRich.getSlides().get(0); List> textParass = slideOne.getTextParagraphs(); List trB = textParass.get(1); @@ -435,7 +435,7 @@ public final class TestTextRun { * */ @Test - public void testBug41015() throws IOException { + void testBug41015() throws IOException { List rt; HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("bug-41015.ppt"); @@ -465,7 +465,7 @@ public final class TestTextRun { * Test creation of TextRun objects. */ @Test - public void testAddTextRun() throws IOException { + void testAddTextRun() throws IOException { HSLFSlideShow ppt = new HSLFSlideShow(); HSLFSlide slide = ppt.createSlide(); @@ -513,7 +513,7 @@ public final class TestTextRun { } @Test - public void test48916() throws IOException { + void test48916() throws IOException { HSLFSlideShow ppt1 = HSLFTestDataSamples.getSlideShow("SampleShow.ppt"); List slides = ppt1.getSlides(); for(HSLFSlide slide : slides){ @@ -556,7 +556,7 @@ public final class TestTextRun { } @Test - public void test52244() throws IOException { + void test52244() throws IOException { HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("52244.ppt"); HSLFSlide slide = ppt.getSlides().get(0); @@ -573,7 +573,7 @@ public final class TestTextRun { } @Test - public void testAppendEmpty() throws IOException { + void testAppendEmpty() throws IOException { HSLFSlideShow ppt = new HSLFSlideShow(); HSLFSlide s = ppt.createSlide(); HSLFTextBox title = s.addTitle(); diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/util/TestSystemTimeUtils.java b/src/scratchpad/testcases/org/apache/poi/hslf/util/TestSystemTimeUtils.java index 8e8bdeccc8..6572ade892 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/util/TestSystemTimeUtils.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/util/TestSystemTimeUtils.java @@ -57,7 +57,7 @@ public final class TestSystemTimeUtils { } @Test - public void testGetDateA() throws Exception { + void testGetDateA() throws Exception { Date date = SystemTimeUtils.getDate(data_a); // Is 2006-01-24 (2nd day of week) 10:26:15.205 @@ -67,7 +67,7 @@ public final class TestSystemTimeUtils { } @Test - public void testGetDateB() throws Exception { + void testGetDateB() throws Exception { Date date = SystemTimeUtils.getDate(data_b, 8+4); // Is 2006-01-24 (2nd day of week) 21:25:03.725 @@ -77,7 +77,7 @@ public final class TestSystemTimeUtils { } @Test - public void testWriteDateA() throws Exception { + void testWriteDateA() throws Exception { byte[] out_a = new byte[data_a.length]; Date date = sdf.parse("2006-01-24 10:26:15.205"); SystemTimeUtils.storeDate(date, out_a); @@ -88,7 +88,7 @@ public final class TestSystemTimeUtils { } @Test - public void testWriteDateB() throws Exception { + void testWriteDateB() throws Exception { byte[] out_b = new byte[data_b.length]; // Copy over start and end, ignoring the 16 byte date field in the middle System.arraycopy(data_b, 0, out_b, 0, 12); diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/Test7BitCodepage.java b/src/scratchpad/testcases/org/apache/poi/hsmf/Test7BitCodepage.java index a30a22c43a..3d3a067bb1 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/Test7BitCodepage.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/Test7BitCodepage.java @@ -54,7 +54,7 @@ public final class Test7BitCodepage { * Evaluate encoding and check if the subject, text body and html body is decoded correctly. */ @Test - public void test7BitEncoding() throws Exception { + void test7BitEncoding() throws Exception { ascii_cp1251_lcid1049.guess7BitEncoding(); ascii_cp1251_lcid1049.setReturnNullOnMissingChunk(true); ascii_utf_8_cp1252_lcid1031.guess7BitEncoding(); diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java index 5ab8857233..c86932231b 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java @@ -66,7 +66,7 @@ public final class TestBasics { * Can we always get the recipient's email? */ @Test - public void testRecipientEmail() throws Exception { + void testRecipientEmail() throws Exception { assertEquals("travis@overwrittenstack.com", simple.getRecipientEmailAddress()); assertEquals("kevin.roast@alfresco.org", quick.getRecipientEmailAddress()); assertEquals("nicolas1.23456@free.fr", attachments.getRecipientEmailAddress()); @@ -86,7 +86,7 @@ public final class TestBasics { * Test subject */ @Test - public void testSubject() throws Exception { + void testSubject() throws Exception { assertEquals("test message", simple.getSubject()); assertEquals("Test the content transformer", quick.getSubject()); assertEquals("IN-SPIRE servers going down for a bit, back up around 8am", outlook30.getSubject()); @@ -97,7 +97,7 @@ public final class TestBasics { * Test message headers */ @Test - public void testHeaders() throws Exception { + void testHeaders() throws Exception { // Simple email first assertEquals(26, simple.getHeaders().length); assertStartsWith(simple.getHeaders()[0], "Return-path:"); @@ -118,7 +118,7 @@ public final class TestBasics { } @Test - public void testBody() throws Exception { + void testBody() throws Exception { // Messages may have their bodies saved as plain text, html, and/or rtf. assertEquals("This is a test message.", simple.getTextBody()); assertEquals("The quick brown fox jumps over the lazy dog\r\n", quick.getTextBody()); @@ -145,7 +145,7 @@ public final class TestBasics { * Test attachments */ @Test - public void testAttachments() { + void testAttachments() { assertEquals(0, simple.getAttachmentFiles().length); assertEquals(0, quick.getAttachmentFiles().length); assertEquals(0, outlook30.getAttachmentFiles().length); @@ -157,7 +157,7 @@ public final class TestBasics { * Use a file with no HTML body */ @Test - public void testMissingChunks() throws Exception { + void testMissingChunks() throws Exception { assertFalse(attachments.isReturnNullOnMissingChunk()); assertThrows(ChunkNotFoundException.class, attachments::getHtmlBody); @@ -174,7 +174,7 @@ public final class TestBasics { * missing recipient email address */ @Test - public void testMissingAddressChunk() throws Exception { + void testMissingAddressChunk() throws Exception { assertFalse(noRecipientAddress.isReturnNullOnMissingChunk()); assertThrows(ChunkNotFoundException.class, noRecipientAddress::getRecipientEmailAddress); assertThrows(ChunkNotFoundException.class, noRecipientAddress::getRecipientEmailAddressList); @@ -198,7 +198,7 @@ public final class TestBasics { * Test the 7 bit detection */ @Test - public void test7BitDetection() { + void test7BitDetection() { assertFalse(unicode.has7BitEncodingStrings()); assertTrue(simple.has7BitEncodingStrings()); assertTrue(chinese.has7BitEncodingStrings()); @@ -212,7 +212,7 @@ public final class TestBasics { * who submitted it in bug #49441 */ @Test - public void testEncoding() throws Exception { + void testEncoding() throws Exception { assertEquals(2, cyrillic.getRecipientDetailsChunks().length); assertEquals("CP1252", cyrillic.getRecipientDetailsChunks()[0].getRecipientDisplayNameChunk().get7BitEncoding()); assertEquals("CP1252", cyrillic.getRecipientDetailsChunks()[1].getRecipientDisplayNameChunk().get7BitEncoding()); diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java index a7ec74f74c..d6d53fe14e 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java @@ -47,7 +47,7 @@ public final class TestBlankFileRead { * Check if we can read the body of the blank message, we expect "". */ @Test - public void testReadBody() { + void testReadBody() { assertThrows(ChunkNotFoundException.class, mapiMessage::getTextBody); } @@ -56,7 +56,7 @@ public final class TestBlankFileRead { * Test to see if we can read the CC Chunk. */ @Test - public void testReadDisplayCC() throws ChunkNotFoundException { + void testReadDisplayCC() throws ChunkNotFoundException { String obtained = mapiMessage.getDisplayCC(); String expected = ""; @@ -67,7 +67,7 @@ public final class TestBlankFileRead { * Test to see if we can read the CC Chunk. */ @Test - public void testReadDisplayTo() throws ChunkNotFoundException { + void testReadDisplayTo() throws ChunkNotFoundException { String obtained = mapiMessage.getDisplayTo(); String expected = ""; @@ -78,7 +78,7 @@ public final class TestBlankFileRead { * Test to see if we can read the FROM Chunk. */ @Test - public void testReadDisplayFrom() { + void testReadDisplayFrom() { assertThrows(ChunkNotFoundException.class, mapiMessage::getDisplayFrom); } @@ -86,7 +86,7 @@ public final class TestBlankFileRead { * Test to see if we can read the CC Chunk. */ @Test - public void testReadDisplayBCC() throws ChunkNotFoundException { + void testReadDisplayBCC() throws ChunkNotFoundException { String obtained = mapiMessage.getDisplayBCC(); String expected = ""; @@ -98,7 +98,7 @@ public final class TestBlankFileRead { * Check if we can read the subject line of the blank message, we expect "" */ @Test - public void testReadSubject() throws Exception { + void testReadSubject() throws Exception { String obtained = mapiMessage.getSubject(); assertEquals("", obtained); } @@ -108,7 +108,7 @@ public final class TestBlankFileRead { * Check if we can read the subject line of the blank message, we expect "" */ @Test - public void testReadConversationTopic() { + void testReadConversationTopic() { assertThrows(ChunkNotFoundException.class, mapiMessage::getConversationTopic); } } diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/TestExtractEmbeddedMSG.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestExtractEmbeddedMSG.java index 4e459c807e..4f0322b806 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/TestExtractEmbeddedMSG.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestExtractEmbeddedMSG.java @@ -76,7 +76,7 @@ public class TestExtractEmbeddedMSG { * */ @Test - public void testEmbeddedMSGProperties() throws IOException, ChunkNotFoundException { + void testEmbeddedMSGProperties() throws IOException, ChunkNotFoundException { AttachmentChunks[] attachments = pdfMsgAttachments.getAttachmentFiles(); assertEquals(2, attachments.length); if (attachments.length == 2) { diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/TestFileWithAttachmentsRead.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestFileWithAttachmentsRead.java index 5252f9193e..1d8cc9f98a 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/TestFileWithAttachmentsRead.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestFileWithAttachmentsRead.java @@ -61,7 +61,7 @@ public class TestFileWithAttachmentsRead { * Test to see if we can retrieve attachments. */ @Test - public void testRetrieveAttachments() { + void testRetrieveAttachments() { // Simple file AttachmentChunks[] attachments = twoSimpleAttachments.getAttachmentFiles(); assertEquals(2, attachments.length); @@ -75,7 +75,7 @@ public class TestFileWithAttachmentsRead { * Bug 60550: Test to see if we get the correct Content-IDs of inline images`. */ @Test - public void testReadContentIDField() throws IOException { + void testReadContentIDField() throws IOException { AttachmentChunks[] attachments = inlineImgMsgAttachments.getAttachmentFiles(); AttachmentChunks attachment; @@ -107,7 +107,7 @@ public class TestFileWithAttachmentsRead { * Test to see if attachments are not empty. */ @Test - public void testReadAttachments() throws IOException { + void testReadAttachments() throws IOException { AttachmentChunks[] attachments = twoSimpleAttachments.getAttachmentFiles(); // Basic checks @@ -150,7 +150,7 @@ public class TestFileWithAttachmentsRead { * Test that we can handle both PDF and MSG attachments */ @Test - public void testReadMsgAttachments() throws Exception { + void testReadMsgAttachments() throws Exception { AttachmentChunks[] attachments = pdfMsgAttachments.getAttachmentFiles(); assertEquals(2, attachments.length); diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/TestFixedSizedProperties.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestFixedSizedProperties.java index f3b27809b7..4db632fb65 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/TestFixedSizedProperties.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestFixedSizedProperties.java @@ -95,7 +95,7 @@ public final class TestFixedSizedProperties { * of our test files */ @Test - public void testPropertiesFound() { + void testPropertiesFound() { Map> props; props = mapiMessageSucceeds.getMainChunks().getProperties(); @@ -109,7 +109,7 @@ public final class TestFixedSizedProperties { * Check we find properties of a variety of different types */ @Test - public void testPropertyValueTypes() { + void testPropertyValueTypes() { Chunks mainChunks = mapiMessageSucceeds.getMainChunks(); // Ask to have the values looked up @@ -141,7 +141,7 @@ public final class TestFixedSizedProperties { * Test to see if we can read the Date Chunk with OutlookTextExtractor. */ @Test - public void testReadMessageDateSucceedsWithOutlookTextExtractor() throws Exception { + void testReadMessageDateSucceedsWithOutlookTextExtractor() throws Exception { OutlookTextExtractor ext = new OutlookTextExtractor(mapiMessageSucceeds); ext.setCloseFilesystem(false); @@ -154,7 +154,7 @@ public final class TestFixedSizedProperties { * Test to see if we can read the Date Chunk with OutlookTextExtractor. */ @Test - public void testReadMessageDateFailsWithOutlookTextExtractor() throws Exception { + void testReadMessageDateFailsWithOutlookTextExtractor() throws Exception { OutlookTextExtractor ext = new OutlookTextExtractor(mapiMessageFails); ext.setCloseFilesystem(false); @@ -167,7 +167,7 @@ public final class TestFixedSizedProperties { * Test to see if we can read the Date Chunk with HSMFDump. */ @Test - public void testReadMessageDateSucceedsWithHSMFDump() throws IOException { + void testReadMessageDateSucceedsWithHSMFDump() throws IOException { PrintStream stream = new PrintStream(new ByteArrayOutputStream(), true, "ISO-8859-1"); HSMFDump dump = new HSMFDump(fsMessageSucceeds); dump.dump(stream); @@ -177,7 +177,7 @@ public final class TestFixedSizedProperties { * Test to see if we can read the Date Chunk with HSMFDump. */ @Test - public void testReadMessageDateFailsWithHSMFDump() throws Exception { + void testReadMessageDateFailsWithHSMFDump() throws Exception { PrintStream stream = new PrintStream(new ByteArrayOutputStream(), true, "ISO-8859-1"); HSMFDump dump = new HSMFDump(fsMessageFails); dump.dump(stream); @@ -187,7 +187,7 @@ public final class TestFixedSizedProperties { * Will be based on the ClientSubmit time */ @Test - public void testClientSubmitTime() throws Exception { + void testClientSubmitTime() throws Exception { // Check via the message date Calendar clientSubmitTime = mapiMessageSucceeds.getMessageDate(); assertEquals( diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunk.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunk.java index 8c1bdf4c9e..171a0816ff 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunk.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunk.java @@ -44,7 +44,7 @@ public final class TestMessageSubmissionChunk { } @Test - public void testReadMessageDateExtraHyphenSubmissionChunk() throws ChunkNotFoundException { + void testReadMessageDateExtraHyphenSubmissionChunk() throws ChunkNotFoundException { final Calendar date = mapiMessageExtraHyphenSubmissionChunk.getMessageDate(); assertNotNull(date); final int year = date.get(Calendar.YEAR); @@ -52,7 +52,7 @@ public final class TestMessageSubmissionChunk { } @Test - public void testReadMessageDateNormalSubmissionChunk() throws ChunkNotFoundException { + void testReadMessageDateNormalSubmissionChunk() throws ChunkNotFoundException { final Calendar date = mapiMessageNormalSubmissionChunk.getMessageDate(); assertNotNull(date); final int year = date.get(Calendar.YEAR); diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java index d95dfcc36d..c3c96022d2 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java @@ -46,7 +46,7 @@ public final class TestMessageSubmissionChunkY2KRead { // 1979 is one year before our pivot year (so this is an expected "failure") @Test - public void testReadMessageDate1979() throws ChunkNotFoundException { + void testReadMessageDate1979() throws ChunkNotFoundException { final Calendar date = mapiMessage1979.getMessageDate(); final int year = date.get(Calendar.YEAR); assertEquals(2079, year); @@ -54,7 +54,7 @@ public final class TestMessageSubmissionChunkY2KRead { // 1980 is our pivot year (so this is an expected "failure") @Test - public void testReadMessageDate1980() throws ChunkNotFoundException { + void testReadMessageDate1980() throws ChunkNotFoundException { final Calendar date = mapiMessage1980.getMessageDate(); final int year = date.get(Calendar.YEAR); assertEquals(2080, year); @@ -62,7 +62,7 @@ public final class TestMessageSubmissionChunkY2KRead { // 1981 is one year after our pivot year (so this starts working) @Test - public void testReadMessageDate1981() throws ChunkNotFoundException { + void testReadMessageDate1981() throws ChunkNotFoundException { final Calendar date = mapiMessage1981.getMessageDate(); final int year = date.get(Calendar.YEAR); assertEquals(1981, year); diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/TestNameIdChunks.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestNameIdChunks.java index 2d7cc1355d..dfb7a765e5 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/TestNameIdChunks.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestNameIdChunks.java @@ -58,7 +58,7 @@ public class TestNameIdChunks { * The keywords property is a property identified by the name "Keywords" in the property set PS_PUBLIC_STRINGS. */ @Test - public void testReadKeywords() { + void testReadKeywords() { long keywordsPropTag = keywordsMsg.getNameIdChunks().getPropertyTag(PS_PUBLIC_STRINGS.getClassID(), "Keywords", 0); assertEquals(0x8003, keywordsPropTag); String[] exp = { "TODO", "Currently Important", "Currently To Do", "Test" }; @@ -71,7 +71,7 @@ public class TestNameIdChunks { * The current version name property is a property identified by the id 0x8554 in the property set PSETID_Common. */ @Test - public void testCurrentVersionName() { + void testCurrentVersionName() { long testPropTag = keywordsMsg.getNameIdChunks().getPropertyTag(PSETID_COMMON.getClassID(), null, 0x8554); assertEquals(0x8006, testPropTag); String[] exp = { "16.0" }; diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java index 638b20f42f..725e7d545a 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java @@ -47,7 +47,7 @@ public final class TestOutlook30FileRead { * Test to see if we can read the CC Chunk. */ @Test - public void testReadDisplayCC() throws ChunkNotFoundException { + void testReadDisplayCC() throws ChunkNotFoundException { String obtained = mapiMessage.getDisplayCC(); String expected = ""; @@ -58,7 +58,7 @@ public final class TestOutlook30FileRead { * Test to see if we can read the CC Chunk. */ @Test - public void testReadDisplayTo() throws ChunkNotFoundException { + void testReadDisplayTo() throws ChunkNotFoundException { String obtained = mapiMessage.getDisplayTo(); assertTrue(obtained.startsWith("Bohn, Shawn")); @@ -68,7 +68,7 @@ public final class TestOutlook30FileRead { * Test to see if we can read the From Chunk. */ @Test - public void testReadDisplayFrom() throws ChunkNotFoundException { + void testReadDisplayFrom() throws ChunkNotFoundException { String obtained = mapiMessage.getDisplayFrom(); String expected = "Cramer, Nick"; @@ -79,7 +79,7 @@ public final class TestOutlook30FileRead { * Test to see if we can read the CC Chunk. */ @Test - public void testReadDisplayBCC() throws ChunkNotFoundException { + void testReadDisplayBCC() throws ChunkNotFoundException { String obtained = mapiMessage.getDisplayBCC(); String expected = ""; @@ -91,7 +91,7 @@ public final class TestOutlook30FileRead { * Check if we can read the body of the blank message, we expect "". */ @Test - public void testReadBody() throws Exception { + void testReadBody() throws Exception { String obtained = mapiMessage.getTextBody(); assertTrue(obtained.startsWith("I am shutting down")); } @@ -100,7 +100,7 @@ public final class TestOutlook30FileRead { * Check if we can read the subject line of the blank message, we expect "" */ @Test - public void testReadSubject() throws Exception { + void testReadSubject() throws Exception { String obtained = mapiMessage.getSubject(); String expected = "IN-SPIRE servers going down for a bit, back up around 8am"; @@ -111,7 +111,7 @@ public final class TestOutlook30FileRead { * Check if we can read the subject line of the blank message, we expect "" */ @Test - public void testReadConversationTopic() throws Exception { + void testReadConversationTopic() throws Exception { String obtained = mapiMessage.getConversationTopic(); assertEquals("IN-SPIRE servers going down for a bit, back up around 8am", obtained); } @@ -120,7 +120,7 @@ public final class TestOutlook30FileRead { * Check if we can read the subject line of the blank message, we expect "" */ @Test - public void testReadMessageClass() throws Exception { + void testReadMessageClass() throws Exception { MAPIMessage.MESSAGE_CLASS obtained = mapiMessage.getMessageClassEnum(); assertEquals(MAPIMessage.MESSAGE_CLASS.NOTE, obtained); } @@ -129,7 +129,7 @@ public final class TestOutlook30FileRead { * Ensure we can get the HTML and RTF versions */ @Test - public void testReadBodyContents() throws Exception { + void testReadBodyContents() throws Exception { String html = mapiMessage.getHtmlBody(); String rtf = mapiMessage.getRtfBody(); assertNotNull(html); diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/TestSimpleFileRead.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestSimpleFileRead.java index 6feaceccee..ecbb8f2550 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/TestSimpleFileRead.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestSimpleFileRead.java @@ -46,7 +46,7 @@ public final class TestSimpleFileRead { * */ @Test - public void testReadDisplayCC() throws ChunkNotFoundException { + void testReadDisplayCC() throws ChunkNotFoundException { String obtained = mapiMessage.getDisplayCC(); String expected = ""; @@ -57,7 +57,7 @@ public final class TestSimpleFileRead { * Test to see if we can read the CC Chunk. */ @Test - public void testReadDisplayTo() throws ChunkNotFoundException { + void testReadDisplayTo() throws ChunkNotFoundException { String obtained = mapiMessage.getDisplayTo(); String expected = "travis@overwrittenstack.com"; @@ -68,7 +68,7 @@ public final class TestSimpleFileRead { * Test to see if we can read the From Chunk. */ @Test - public void testReadDisplayFrom() throws ChunkNotFoundException { + void testReadDisplayFrom() throws ChunkNotFoundException { String obtained = mapiMessage.getDisplayFrom(); String expected = "Travis Ferguson"; @@ -79,7 +79,7 @@ public final class TestSimpleFileRead { * Test to see if we can read the CC Chunk. */ @Test - public void testReadDisplayBCC() throws ChunkNotFoundException { + void testReadDisplayBCC() throws ChunkNotFoundException { String obtained = mapiMessage.getDisplayBCC(); String expected = ""; @@ -91,7 +91,7 @@ public final class TestSimpleFileRead { * Check if we can read the body of the blank message, we expect "". */ @Test - public void testReadBody() throws Exception { + void testReadBody() throws Exception { String obtained = mapiMessage.getTextBody(); String expected = "This is a test message."; @@ -102,7 +102,7 @@ public final class TestSimpleFileRead { * Check if we can read the subject line of the blank message, we expect "" */ @Test - public void testReadSubject() throws Exception { + void testReadSubject() throws Exception { String obtained = mapiMessage.getSubject(); String expected = "test message"; @@ -113,7 +113,7 @@ public final class TestSimpleFileRead { * Check if we can read the subject line of the blank message, we expect "" */ @Test - public void testReadConversationTopic() throws Exception { + void testReadConversationTopic() throws Exception { String obtained = mapiMessage.getConversationTopic(); assertEquals("test message", obtained); } @@ -123,7 +123,7 @@ public final class TestSimpleFileRead { * Check if we can read the subject line of the blank message, we expect "" */ @Test - public void testReadMessageClass() throws Exception { + void testReadMessageClass() throws Exception { MAPIMessage.MESSAGE_CLASS obtained = mapiMessage.getMessageClassEnum(); assertEquals(MAPIMessage.MESSAGE_CLASS.NOTE, obtained); } @@ -132,7 +132,7 @@ public final class TestSimpleFileRead { * Check the various message classes */ @Test - public void testReadMessageClass2() throws Exception { + void testReadMessageClass2() throws Exception { assertEquals( MAPIMessage.MESSAGE_CLASS.NOTE, mapiMessage.getMessageClassEnum()); diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestChunkData.java b/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestChunkData.java index ffb9c40b72..d61ec49805 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestChunkData.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestChunkData.java @@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test; */ public final class TestChunkData { @Test - public void testChunkCreate() { + void testChunkCreate() { Chunk chunk; chunk = new StringChunk(0x0200, Types.createCustom(0x001E)); @@ -57,32 +57,32 @@ public final class TestChunkData { } @Test - public void testTextBodyChunk() { + void testTextBodyChunk() { StringChunk chunk = new StringChunk(0x1000, Types.UNICODE_STRING); assertEquals(chunk.getChunkId(), MAPIProperty.BODY.id); } @Test - public void testDisplayToChunk() { + void testDisplayToChunk() { StringChunk chunk = new StringChunk(0x0E04, Types.UNICODE_STRING); assertEquals(chunk.getChunkId(), MAPIProperty.DISPLAY_TO.id); } @Test - public void testDisplayCCChunk() { + void testDisplayCCChunk() { StringChunk chunk = new StringChunk(0x0E03, Types.UNICODE_STRING); assertEquals(chunk.getChunkId(), MAPIProperty.DISPLAY_CC.id); } @Test - public void testDisplayBCCChunk() { + void testDisplayBCCChunk() { StringChunk chunk = new StringChunk(0x0E02, Types.UNICODE_STRING); assertEquals(chunk.getChunkId(), MAPIProperty.DISPLAY_BCC.id); } @Test - public void testSubjectChunk() { + void testSubjectChunk() { Chunk chunk = new StringChunk(0x0037, Types.UNICODE_STRING); assertEquals(chunk.getChunkId(), MAPIProperty.SUBJECT.id); } diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestMAPIProperty.java b/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestMAPIProperty.java index eaa5568af3..d9f0a110c6 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestMAPIProperty.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestMAPIProperty.java @@ -31,14 +31,14 @@ import org.junit.jupiter.api.Test; */ public final class TestMAPIProperty { @Test - public void testGet() { + void testGet() { assertEquals(MAPIProperty.DISPLAY_NAME, MAPIProperty.get(MAPIProperty.DISPLAY_NAME.id)); assertEquals(MAPIProperty.DISPLAY_BCC, MAPIProperty.get(MAPIProperty.DISPLAY_BCC.id)); assertNotSame(MAPIProperty.DISPLAY_BCC, MAPIProperty.get(MAPIProperty.DISPLAY_CC.id)); } @Test - public void testGetAll() { + void testGetAll() { Collection all = MAPIProperty.getAll(); assertTrue(all.contains(MAPIProperty.DISPLAY_NAME)); assertTrue(all.contains(MAPIProperty.DISPLAY_CC)); @@ -51,7 +51,7 @@ public final class TestMAPIProperty { } @Test - public void testCustom() { + void testCustom() { MAPIProperty c1 = MAPIProperty.createCustom(1, Types.UNSPECIFIED, ""); MAPIProperty c2a = MAPIProperty.createCustom(2, Types.UNSPECIFIED, "2"); MAPIProperty c2b = MAPIProperty.createCustom(2, Types.UNSPECIFIED, "2"); diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestSorters.java b/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestSorters.java index 9f68c44b03..4951b535d4 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestSorters.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestSorters.java @@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test; */ public final class TestSorters { @Test - public void testAttachmentChunksSorter() { + void testAttachmentChunksSorter() { AttachmentChunks[] chunks; // Simple @@ -63,7 +63,7 @@ public final class TestSorters { } @Test - public void testRecipientChunksSorter() { + void testRecipientChunksSorter() { RecipientChunks[] chunks; // Simple diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestTypes.java b/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestTypes.java index d1ccc105c7..468e569383 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestTypes.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestTypes.java @@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test; */ public final class TestTypes { @Test - public void testTypeIds() { + void testTypeIds() { assertEquals(0x1e, Types.ASCII_STRING.getId()); assertEquals(0x1f, Types.UNICODE_STRING.getId()); @@ -47,7 +47,7 @@ public final class TestTypes { } @Test - public void testTypeFormatting() { + void testTypeFormatting() { assertEquals("0000", Types.asFileEnding(0x0000)); assertEquals("0020", Types.asFileEnding(0x0020)); assertEquals("0102", Types.asFileEnding(0x0102)); @@ -55,7 +55,7 @@ public final class TestTypes { } @Test - public void testName() { + void testName() { assertEquals("ASCII String", Types.ASCII_STRING.getName()); assertEquals("Boolean", Types.BOOLEAN.getName()); } diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/extractor/TestOutlookTextExtractor.java b/src/scratchpad/testcases/org/apache/poi/hsmf/extractor/TestOutlookTextExtractor.java index e6704664d3..bb3c4b3cd0 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/extractor/TestOutlookTextExtractor.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/extractor/TestOutlookTextExtractor.java @@ -55,7 +55,7 @@ public final class TestOutlookTextExtractor { } @Test - public void testQuick() throws Exception { + void testQuick() throws Exception { try (POIFSFileSystem poifs = new POIFSFileSystem(samples.getFile("quick.msg"), true); MAPIMessage msg = new MAPIMessage(poifs); OutlookTextExtractor ext = new OutlookTextExtractor(msg)) { @@ -77,7 +77,7 @@ public final class TestOutlookTextExtractor { } @Test - public void testSimple() throws Exception { + void testSimple() throws Exception { try (POIFSFileSystem poifs = new POIFSFileSystem(samples.getFile("simple_test_msg.msg"), true); MAPIMessage msg = new MAPIMessage(poifs); OutlookTextExtractor ext = new OutlookTextExtractor(msg)) { @@ -94,7 +94,7 @@ public final class TestOutlookTextExtractor { } @Test - public void testConstructors() throws Exception { + void testConstructors() throws Exception { String inp; try (FileInputStream fis = new FileInputStream(samples.getFile("simple_test_msg.msg")); OutlookTextExtractor ext = new OutlookTextExtractor(fis)) { @@ -122,7 +122,7 @@ public final class TestOutlookTextExtractor { * recipients in an email we sent. */ @Test - public void testSentWithMulipleRecipients() throws Exception { + void testSentWithMulipleRecipients() throws Exception { // To: 'Ashutosh Dandavate' , // 'Paul Holmes-Higgin' , // 'Mike Farman' @@ -159,7 +159,7 @@ public final class TestOutlookTextExtractor { * recipients in an email we received. */ @Test - public void testReceivedWithMultipleRecipients() throws Exception { + void testReceivedWithMultipleRecipients() throws Exception { // To: 'Ashutosh Dandavate' , // 'Paul Holmes-Higgin' , // 'Mike Farman' @@ -195,7 +195,7 @@ public final class TestOutlookTextExtractor { */ @SuppressWarnings("JavadocReference") @Test - public void testWithAttachments() throws Exception { + void testWithAttachments() throws Exception { try (POIFSFileSystem poifs = new POIFSFileSystem(samples.getFile("attachment_test_msg.msg"), true); MAPIMessage msg = new MAPIMessage(poifs); OutlookTextExtractor ext = new OutlookTextExtractor(msg)) { @@ -219,7 +219,7 @@ public final class TestOutlookTextExtractor { } @Test - public void testWithAttachedMessage() throws Exception { + void testWithAttachedMessage() throws Exception { try (POIFSFileSystem poifs = new POIFSFileSystem(samples.getFile("58214_with_attachment.msg"), true); MAPIMessage msg = new MAPIMessage(poifs); OutlookTextExtractor ext = new OutlookTextExtractor(msg)) { @@ -236,7 +236,7 @@ public final class TestOutlookTextExtractor { } @Test - public void testEncodings() throws Exception { + void testEncodings() throws Exception { try (POIFSFileSystem poifs = new POIFSFileSystem(samples.getFile("chinese-traditional.msg"), true); MAPIMessage msg = new MAPIMessage(poifs); OutlookTextExtractor ext = new OutlookTextExtractor(msg)) { diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/parsers/TestPOIFSChunkParser.java b/src/scratchpad/testcases/org/apache/poi/hsmf/parsers/TestPOIFSChunkParser.java index e8f175266a..f2070fcdb3 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/parsers/TestPOIFSChunkParser.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/parsers/TestPOIFSChunkParser.java @@ -51,7 +51,7 @@ public final class TestPOIFSChunkParser { private final POIDataSamples samples = POIDataSamples.getHSMFInstance(); @Test - public void testFindsCore() throws IOException, ChunkNotFoundException { + void testFindsCore() throws IOException, ChunkNotFoundException { POIFSFileSystem simple = new POIFSFileSystem(samples.getFile("quick.msg"), true); // Check a few core things are present @@ -78,7 +78,7 @@ public final class TestPOIFSChunkParser { } @Test - public void testFindsRecips() throws IOException, ChunkNotFoundException { + void testFindsRecips() throws IOException, ChunkNotFoundException { POIFSFileSystem simple = new POIFSFileSystem(samples.getFile("quick.msg"), true); simple.getRoot().getEntry("__recip_version1.0_#00000000"); @@ -134,7 +134,7 @@ public final class TestPOIFSChunkParser { } @Test - public void testFindsMultipleRecipients() throws IOException, ChunkNotFoundException { + void testFindsMultipleRecipients() throws IOException, ChunkNotFoundException { POIFSFileSystem multiple = new POIFSFileSystem(samples.getFile("example_received_unicode.msg"), true); multiple.getRoot().getEntry("__recip_version1.0_#00000000"); @@ -227,7 +227,7 @@ public final class TestPOIFSChunkParser { } @Test - public void testFindsNameId() throws IOException { + void testFindsNameId() throws IOException { POIFSFileSystem simple = new POIFSFileSystem(samples.getFile("quick.msg"), true); simple.getRoot().getEntry("__nameid_version1.0"); @@ -251,7 +251,7 @@ public final class TestPOIFSChunkParser { } @Test - public void testFindsAttachments() throws IOException, ChunkNotFoundException { + void testFindsAttachments() throws IOException, ChunkNotFoundException { POIFSFileSystem with = new POIFSFileSystem(samples.getFile("attachment_test_msg.msg"), true); POIFSFileSystem without = new POIFSFileSystem(samples.getFile("quick.msg"), true); AttachmentChunks attachment; @@ -327,7 +327,7 @@ public final class TestPOIFSChunkParser { * such as "Olk10SideProps_0001" */ @Test - public void testOlk10SideProps() throws IOException, ChunkNotFoundException { + void testOlk10SideProps() throws IOException, ChunkNotFoundException { POIFSFileSystem poifs = new POIFSFileSystem(samples.getFile("51873.msg"), true); MAPIMessage msg = new MAPIMessage(poifs); diff --git a/src/scratchpad/testcases/org/apache/poi/hssf/converter/TestExcelConverterSuite.java b/src/scratchpad/testcases/org/apache/poi/hssf/converter/TestExcelConverterSuite.java index 220bb58e05..67ccae0cb4 100644 --- a/src/scratchpad/testcases/org/apache/poi/hssf/converter/TestExcelConverterSuite.java +++ b/src/scratchpad/testcases/org/apache/poi/hssf/converter/TestExcelConverterSuite.java @@ -61,7 +61,7 @@ public class TestExcelConverterSuite @ParameterizedTest @MethodSource("files") - public void testFo(File child) throws Exception + void testFo(File child) throws Exception { HSSFWorkbook workbook; try { @@ -87,7 +87,7 @@ public class TestExcelConverterSuite @ParameterizedTest @MethodSource("files") - public void testHtml(File child) throws Exception + void testHtml(File child) throws Exception { HSSFWorkbook workbook; try { diff --git a/src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java b/src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java index d1440c0c32..c71f7948e7 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java +++ b/src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java @@ -65,7 +65,7 @@ public class TestHwmfParsing { } @Test - public void testInfiniteLoop() throws Exception { + void testInfiniteLoop() throws Exception { try (InputStream is = samples.openResourceAsStream("61338.wmf")) { assertThrows(RecordFormatException.class, () -> new HwmfPicture(is)); } @@ -74,7 +74,7 @@ public class TestHwmfParsing { @Test @Disabled("If we decide we can use common crawl file specified, we can turn this back on") - public void testCyrillic() throws Exception { + void testCyrillic() throws Exception { //TODO: move test file to framework and fix this File dir = new File("C:/somethingOrOther"); File f = new File(dir, "ZMLH54SPLI76NQ7XMKVB7SMUJA2HTXTS-2.wmf"); @@ -101,7 +101,7 @@ public class TestHwmfParsing { } @Test - public void testShift_JIS() throws Exception { + void testShift_JIS() throws Exception { //this file derives from common crawl: see Bug 60677 HwmfPicture wmf = null; try (InputStream fis = samples.openResourceAsStream("60677.wmf")) { @@ -128,7 +128,7 @@ public class TestHwmfParsing { } @Test - public void testLengths() throws Exception { + void testLengths() throws Exception { //both substring and length rely on char, not codepoints. //This test confirms that the substring calls in HwmfText //will not truncate even beyond-bmp data. diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/TestFieldsTables.java b/src/scratchpad/testcases/org/apache/poi/hwpf/TestFieldsTables.java index e3323d6e8d..1e1b5b3841 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/TestFieldsTables.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/TestFieldsTables.java @@ -67,7 +67,7 @@ public class TestFieldsTables extends HWPFTestCase { } @Test - public void testReadFields() { + void testReadFields() { FileInformationBlock fib = _hWPFDocFixture._fib; byte[] tableStream = _hWPFDocFixture._tableStream; diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java b/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java index 09e2ae2e75..2ccf5f9085 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java @@ -70,7 +70,7 @@ public final class TestHWPFPictures { * Test just opening the files */ @Test - public void testOpen() { + void testOpen() { HWPFTestDataSamples.openSampleFile(docAFile); HWPFTestDataSamples.openSampleFile(docBFile); } @@ -79,7 +79,7 @@ public final class TestHWPFPictures { * Test that we have the right numbers of images in each file */ @Test - public void testImageCount() { + void testImageCount() { HWPFDocument docA = HWPFTestDataSamples.openSampleFile(docAFile); HWPFDocument docB = HWPFTestDataSamples.openSampleFile(docBFile); @@ -100,7 +100,7 @@ public final class TestHWPFPictures { * Test that we have the right images in at least one file */ @Test - public void testImageData() { + void testImageData() { HWPFDocument docB = HWPFTestDataSamples.openSampleFile(docBFile); PicturesTable picB = docB.getPicturesTable(); List picturesB = picB.getAllPictures(); @@ -125,7 +125,7 @@ public final class TestHWPFPictures { * Test that compressed image data is correctly returned. */ @Test - public void testCompressedImageData() { + void testCompressedImageData() { HWPFDocument docC = HWPFTestDataSamples.openSampleFile(docCFile); PicturesTable picC = docC.getPicturesTable(); List picturesC = picC.getAllPictures(); @@ -141,7 +141,7 @@ public final class TestHWPFPictures { } @Test - public void testMacImages() throws Exception { + void testMacImages() throws Exception { HWPFDocument docC = HWPFTestDataSamples.openSampleFile("53446.doc"); PicturesTable picturesTable = docC.getPicturesTable(); List pictures = picturesTable.getAllPictures(); @@ -170,7 +170,7 @@ public final class TestHWPFPictures { * bug #44937 */ @Test - public void testEscherDrawing() { + void testEscherDrawing() { HWPFDocument docD = HWPFTestDataSamples.openSampleFile(docDFile); List allPictures = docD.getPicturesTable().getAllPictures(); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java b/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java index e085ce3564..f074b3f5b1 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java @@ -106,7 +106,7 @@ public final class TestHWPFRangeParts { * TODO - Make this work with 3+ runs */ @Test - public void testContents() { + void testContents() { HWPFDocument doc = docAscii; for(int run=0; run<3; run++) { Range r; @@ -153,7 +153,7 @@ public final class TestHWPFRangeParts { } @Test - public void testContentsUnicode() { + void testContentsUnicode() { Range r; // Now check the real ranges diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/AbstractWordUtilsTest.java b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/AbstractWordUtilsTest.java index 5e43417a85..840e90264f 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/AbstractWordUtilsTest.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/AbstractWordUtilsTest.java @@ -32,7 +32,7 @@ public class AbstractWordUtilsTest { * Test case for {@link AbstractWordUtils#buildTableCellEdgesArray(Table)} */ @Test - public void testBuildTableCellEdgesArray() { + void testBuildTableCellEdgesArray() { HWPFDocument document = HWPFTestDataSamples .openSampleFile( "table-merges.doc" ); final Range range = document.getRange(); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestNumberFormatter.java b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestNumberFormatter.java index d7ae2ce0a6..bb28ff5196 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestNumberFormatter.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestNumberFormatter.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; public class TestNumberFormatter { @Test - public void testRoman() { + void testRoman() { assertEquals( "i", NumberFormatter.getNumber( 1, 2 ) ); assertEquals( "ii", NumberFormatter.getNumber( 2, 2 ) ); assertEquals( "iii", NumberFormatter.getNumber( 3, 2 ) ); @@ -41,7 +41,7 @@ public class TestNumberFormatter { } @Test - public void testEnglish() { + void testEnglish() { assertEquals( "a", NumberFormatter.getNumber( 1, 4 ) ); assertEquals( "z", NumberFormatter.getNumber( 26, 4 ) ); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToConverterSuite.java b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToConverterSuite.java index 74975f70f4..fcae380bbf 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToConverterSuite.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToConverterSuite.java @@ -67,7 +67,7 @@ public class TestWordToConverterSuite @ParameterizedTest @MethodSource("files") - public void testFo(File child) throws Exception { + void testFo(File child) throws Exception { HWPFDocumentCore hwpfDocument = AbstractWordUtils.loadDoc( child ); WordToFoConverter wordToFoConverter = new WordToFoConverter( @@ -87,7 +87,7 @@ public class TestWordToConverterSuite @ParameterizedTest @MethodSource("files") - public void testHtml(File child) throws Exception { + void testHtml(File child) throws Exception { HWPFDocumentCore hwpfDocument = AbstractWordUtils.loadDoc( child ); WordToHtmlConverter wordToHtmlConverter = new WordToHtmlConverter( @@ -108,7 +108,7 @@ public class TestWordToConverterSuite @ParameterizedTest @MethodSource("files") - public void testText(File child) throws Exception { + void testText(File child) throws Exception { HWPFDocumentCore wordDocument = AbstractWordUtils.loadDoc( child ); WordToTextConverter wordToTextConverter = new WordToTextConverter( diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToFoConverter.java b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToFoConverter.java index c12f6e978b..62c1c955e0 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToFoConverter.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToFoConverter.java @@ -57,7 +57,7 @@ public class TestWordToFoConverter } @Test - public void testDocumentProperties() throws Exception + void testDocumentProperties() throws Exception { String result = getFoText( "documentProperties.doc" ); @@ -70,7 +70,7 @@ public class TestWordToFoConverter } @Test - public void testEndnote() throws Exception + void testEndnote() throws Exception { String result = getFoText( "endingnote.doc" ); @@ -86,7 +86,7 @@ public class TestWordToFoConverter } @Test - public void testEquation() throws Exception + void testEquation() throws Exception { final String sampleFileName = "equation.doc"; String result = getFoText( sampleFileName ); @@ -95,7 +95,7 @@ public class TestWordToFoConverter } @Test - public void testHyperlink() throws Exception + void testHyperlink() throws Exception { final String sampleFileName = "hyperlink.doc"; String result = getFoText( sampleFileName ); @@ -106,7 +106,7 @@ public class TestWordToFoConverter } @Test - public void testInnerTable() throws Exception + void testInnerTable() throws Exception { final String sampleFileName = "innertable.doc"; String result = getFoText( sampleFileName ); @@ -116,7 +116,7 @@ public class TestWordToFoConverter } @Test - public void testPageBreak() throws Exception + void testPageBreak() throws Exception { final String sampleFileName = "page-break.doc"; String result = getFoText( sampleFileName ); @@ -125,7 +125,7 @@ public class TestWordToFoConverter } @Test - public void testPageBreakBefore() throws Exception + void testPageBreakBefore() throws Exception { final String sampleFileName = "page-break-before.doc"; String result = getFoText( sampleFileName ); @@ -134,7 +134,7 @@ public class TestWordToFoConverter } @Test - public void testPageref() throws Exception + void testPageref() throws Exception { final String sampleFileName = "pageref.doc"; String result = getFoText( sampleFileName ); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToHtmlConverter.java b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToHtmlConverter.java index 233d641758..c2524ad6f4 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToHtmlConverter.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToHtmlConverter.java @@ -68,13 +68,13 @@ public class TestWordToHtmlConverter { } @Test - public void testAIOOBTap() throws Exception { + void testAIOOBTap() throws Exception { String result = getHtmlText("AIOOB-Tap.doc"); assertContains(result, ""); } @Test - public void testBug33519() throws Exception { + void testBug33519() throws Exception { String result = getHtmlText("Bug33519.doc"); assertContains( result, @@ -84,7 +84,7 @@ public class TestWordToHtmlConverter { } @Test - public void testBug46610_2() throws Exception { + void testBug46610_2() throws Exception { String result = getHtmlText("Bug46610_2.doc"); assertContains( result, @@ -92,14 +92,14 @@ public class TestWordToHtmlConverter { } @Test - public void testBug46817() throws Exception { + void testBug46817() throws Exception { String result = getHtmlText("Bug46817.doc"); final String substring = "
"; assertContains(result, substring); } @Test - public void testBug47286() throws Exception { + void testBug47286() throws Exception { String result = getHtmlText("Bug47286.doc"); assertFalse(result.contains("FORMTEXT")); @@ -110,12 +110,12 @@ public class TestWordToHtmlConverter { } @Test - public void testBug48075() throws Exception { + void testBug48075() throws Exception { getHtmlText("Bug48075.doc"); } @Test - public void testBug52583() throws Exception { + void testBug52583() throws Exception { String result = getHtmlText("Bug52583.doc"); assertContains( result, @@ -123,13 +123,13 @@ public class TestWordToHtmlConverter { } @Test - public void testBug53182() throws Exception { + void testBug53182() throws Exception { String result = getHtmlText("Bug53182.doc"); assertFalse(result.contains("italic")); } @Test - public void testDocumentProperties() throws Exception { + void testDocumentProperties() throws Exception { String result = getHtmlText("documentProperties.doc"); assertContains(result, "This is document title"); @@ -138,14 +138,14 @@ public class TestWordToHtmlConverter { } @Test - public void testEmailhyperlink() throws Exception { + void testEmailhyperlink() throws Exception { String result = getHtmlText("Bug47286.doc"); final String substring = "provisastpet@mfa.gov.cy"; assertContains(result, substring); } @Test - public void testEndnote() throws Exception { + void testEndnote() throws Exception { String result = getHtmlText("endingnote.doc"); assertContains( @@ -159,14 +159,14 @@ public class TestWordToHtmlConverter { } @Test - public void testEquation() throws Exception { + void testEquation() throws Exception { String result = getHtmlText("equation.doc"); assertContains(result, ""); } @Test - public void testHyperlink() throws Exception { + void testHyperlink() throws Exception { String result = getHtmlText("hyperlink.doc"); assertContains(result, "Before text; "); @@ -211,7 +211,7 @@ public class TestWordToHtmlConverter { } @Test - public void testPicture() throws Exception { + void testPicture() throws Exception { String result = getHtmlText("picture.doc", true); // picture @@ -225,14 +225,14 @@ public class TestWordToHtmlConverter { } @Test - public void testPicturesEscher() throws Exception { + void testPicturesEscher() throws Exception { String result = getHtmlText("pictures_escher.doc", true); assertContains(result, ""); assertContains(result, ""); } @Test - public void testTableMerges() throws Exception { + void testTableMerges() throws Exception { String result = getHtmlText("table-merges.doc"); assertContains(result, "
"); @@ -240,7 +240,7 @@ public class TestWordToHtmlConverter { } @Test - public void testBug52420() throws Exception { + void testBug52420() throws Exception { String result = getHtmlText("52420.doc"); assertFalse(result.contains("FORMTEXT")); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToTextConverter.java b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToTextConverter.java index 55fa2aa9e3..2a72fd8808 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToTextConverter.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToTextConverter.java @@ -29,7 +29,7 @@ public class TestWordToTextConverter { * website as an embedded object */ @Test - public void testBug47731() throws Exception { + void testBug47731() throws Exception { try (HWPFDocument doc = openSampleFile( "Bug47731.doc" )) { String foundText = WordToTextConverter.getText(doc); @@ -38,7 +38,7 @@ public class TestWordToTextConverter { } @Test - public void testBug52311() throws Exception { + void testBug52311() throws Exception { try (HWPFDocument doc = openSampleFile( "Bug52311.doc" )) { String result = WordToTextConverter.getText(doc); @@ -54,7 +54,7 @@ public class TestWordToTextConverter { } @Test - public void testBug53380_3() throws Exception { + void testBug53380_3() throws Exception { try (HWPFDocument doc = openSampleFile( "Bug53380_3.doc" )) { WordToTextConverter.getText(doc); } diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestDifferentRoutes.java b/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestDifferentRoutes.java index 25a502be00..6afaeb3572 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestDifferentRoutes.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestDifferentRoutes.java @@ -70,7 +70,7 @@ public final class TestDifferentRoutes { * Test model based extraction */ @Test - public void testExtractFromModel() { + void testExtractFromModel() { Range r = doc.getRange(); String[] text = new String[r.numParagraphs()]; @@ -86,7 +86,7 @@ public final class TestDifferentRoutes { * Test textPieces based extraction */ @Test - public void testExtractFromTextPieces() throws Exception { + void testExtractFromTextPieces() throws Exception { String expected = StringUtil.join(p_text, ""); assertEquals(expected, doc.getDocumentText()); } diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java b/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java index 39b4b5c8f9..f250b5daa4 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java @@ -84,7 +84,7 @@ public final class TestWordExtractor { * Test paragraph based extraction */ @Test - public void testExtractFromParagraphs() throws IOException { + void testExtractFromParagraphs() throws IOException { WordExtractor extractor = openExtractor("test2.doc"); String[] text = extractor.getParagraphText(); @@ -107,7 +107,7 @@ public final class TestWordExtractor { * Test the paragraph -> flat extraction */ @Test - public void testGetText() throws IOException { + void testGetText() throws IOException { WordExtractor extractor = openExtractor("test2.doc"); assertEqualsTrim(p_text1_block, extractor.getText()); @@ -125,7 +125,7 @@ public final class TestWordExtractor { * Test textPieces based extraction */ @Test - public void testExtractFromTextPieces() throws IOException { + void testExtractFromTextPieces() throws IOException { WordExtractor extractor = openExtractor("test2.doc"); String text = extractor.getTextFromPieces(); assertEquals(p_text1_block, text); @@ -137,7 +137,7 @@ public final class TestWordExtractor { * Test that we can get data from two different embedded word documents */ @Test - public void testExtractFromEmbeded() throws IOException { + void testExtractFromEmbeded() throws IOException { InputStream is = POIDataSamples.getSpreadSheetInstance().openResourceAsStream("excel_with_embeded.xls"); POIFSFileSystem fs = new POIFSFileSystem(is); is.close(); @@ -181,7 +181,7 @@ public final class TestWordExtractor { } @Test - public void testWithHeader() throws IOException { + void testWithHeader() throws IOException { // Non-unicode HWPFDocument doc1 = HWPFTestDataSamples.openSampleFile("ThreeColHeadFoot.doc"); WordExtractor extractor1 = new WordExtractor(doc1); @@ -204,7 +204,7 @@ public final class TestWordExtractor { } @Test - public void testWithFooter() throws IOException { + void testWithFooter() throws IOException { // Non-unicode HWPFDocument doc1 = HWPFTestDataSamples.openSampleFile("ThreeColHeadFoot.doc"); WordExtractor extractor1 = new WordExtractor(doc1); @@ -227,7 +227,7 @@ public final class TestWordExtractor { } @Test - public void testFootnote() throws IOException { + void testFootnote() throws IOException { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("footnote.doc"); WordExtractor extractor = new WordExtractor(doc); @@ -241,7 +241,7 @@ public final class TestWordExtractor { } @Test - public void testEndnote() throws IOException { + void testEndnote() throws IOException { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("footnote.doc"); WordExtractor extractor = new WordExtractor(doc); @@ -255,20 +255,20 @@ public final class TestWordExtractor { } @Test - public void testComments() throws IOException { + void testComments() throws IOException { WordExtractor extractor = openExtractor("footnote.doc"); assertExtractedContains(extractor.getCommentsText(), "TestComment"); extractor.close(); } @Test - public void testWord95_WordExtractor() { + void testWord95_WordExtractor() { // Too old for the default assertThrows(OldWordFileFormatException.class, () -> openExtractor("Word95.doc")); } @Test - public void testWord95() throws Exception { + void testWord95() throws Exception { // Can work with the special one InputStream is = docTests.openResourceAsStream("Word95.doc"); Word6Extractor w6e = new Word6Extractor(is); @@ -295,13 +295,13 @@ public final class TestWordExtractor { } @Test - public void testWord6_WordExtractor() { + void testWord6_WordExtractor() { // Too old for the default assertThrows(OldWordFileFormatException.class, () -> openExtractor("Word6.doc")); } @Test - public void testWord6() throws Exception { + void testWord6() throws Exception { try (InputStream is = docTests.openResourceAsStream("Word6.doc"); Word6Extractor w6e = new Word6Extractor(is)) { String text = w6e.getText(); @@ -316,7 +316,7 @@ public final class TestWordExtractor { } @Test - public void testFastSaved() throws Exception { + void testFastSaved() throws Exception { WordExtractor extractor = openExtractor("rasp.doc"); String text = extractor.getText(); @@ -327,7 +327,7 @@ public final class TestWordExtractor { } @Test - public void testFirstParagraphFix() throws Exception { + void testFirstParagraphFix() throws Exception { WordExtractor extractor = openExtractor("Bug48075.doc"); String text = extractor.getText(); @@ -341,7 +341,7 @@ public final class TestWordExtractor { * and {@link POIFSFileSystem} */ @Test - public void testDifferentPOIFS() throws Exception { + void testDifferentPOIFS() throws Exception { // Open the two filesystems File file = docTests.getFile("test2.doc"); try (POIFSFileSystem poifs = new POIFSFileSystem(file, true)) { @@ -368,7 +368,7 @@ public final class TestWordExtractor { * ConcurrentModificationException in Tika's OfficeParser */ @Test - public void testBug51686() throws IOException { + void testBug51686() throws IOException { InputStream is = docTests.openResourceAsStream( "Bug51686.doc" ); POIFSFileSystem fs = new POIFSFileSystem(is); is.close(); @@ -388,7 +388,7 @@ public final class TestWordExtractor { } @Test - public void testExtractorFromWord6Extractor() throws Exception { + void testExtractorFromWord6Extractor() throws Exception { try (InputStream is = POIDataSamples.getHPSFInstance().openResourceAsStream("TestMickey.doc"); POIFSFileSystem fs = new POIFSFileSystem(is); Word6Extractor wExt = new Word6Extractor(fs); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractorBugs.java b/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractorBugs.java index a0a6da81ac..e2036a7d53 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractorBugs.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractorBugs.java @@ -35,7 +35,7 @@ public final class TestWordExtractorBugs { private static final POIDataSamples SAMPLES = POIDataSamples.getDocumentInstance(); @Test - public void testProblemMetadata() throws IOException { + void testProblemMetadata() throws IOException { InputStream is = SAMPLES.openResourceAsStream("ProblemExtracting.doc"); WordExtractor extractor = new WordExtractor(is); is.close(); @@ -48,7 +48,7 @@ public final class TestWordExtractorBugs { } @Test - public void testBug50688() throws Exception { + void testBug50688() throws Exception { InputStream is = SAMPLES.openResourceAsStream("parentinvguid.doc"); WordExtractor extractor = new WordExtractor(is); is.close(); @@ -59,7 +59,7 @@ public final class TestWordExtractorBugs { } @Test - public void testBug60374() throws Exception { + void testBug60374() throws Exception { POIFSFileSystem fs = new POIFSFileSystem(SAMPLES.openResourceAsStream("cn.orthodox.www_divenbog_APRIL_30-APRIL.DOC")); final POITextExtractor extractor = ExtractorFactory.createExtractor(fs); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/PlfLfoTest.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/PlfLfoTest.java index df3517820c..c1ae598fb0 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/PlfLfoTest.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/PlfLfoTest.java @@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test; public class PlfLfoTest { @Test - public void testAdd() { + void testAdd() { PlfLfo p = new PlfLfo(new byte[] {0, 0, 0, 0}, 0, 0); assertEquals(0, p.getLfoMac()); p.add(new LFO(new byte[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 0), new LFOData()); @@ -36,7 +36,7 @@ public class PlfLfoTest { } @Test - public void testEquals() { + void testEquals() { PlfLfo p = new PlfLfo(new byte[] {0, 0, 0, 0}, 0, 0); PlfLfo p2 = new PlfLfo(new byte[] {0, 0, 0, 0}, 0, 0); assertEquals(0, p.getLfoMac()); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestBookmarksTables.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestBookmarksTables.java index 8cd150ce49..7685525e16 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestBookmarksTables.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestBookmarksTables.java @@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test; */ public class TestBookmarksTables { @Test - public void test() throws IOException { + void test() throws IOException { try (HWPFDocument doc = openSampleFile( "pageref.doc" )) { Bookmarks bookmarks = doc.getBookmarks(); @@ -47,7 +47,7 @@ public class TestBookmarksTables { } @Test - public void testDeleteRange() throws IOException { + void testDeleteRange() throws IOException { try (HWPFDocument doc = openSampleFile( "pageref.doc" )) { Range range = new Range(27, 41, doc); range.delete(); @@ -57,7 +57,7 @@ public class TestBookmarksTables { } @Test - public void testReplaceTextAfter() throws IOException { + void testReplaceTextAfter() throws IOException { try (HWPFDocument doc = openSampleFile( "pageref.doc" )) { Bookmark bookmark = doc.getBookmarks().getBookmark(0); Range range = new Range(bookmark.getStart(), bookmark.getEnd(), doc); @@ -71,7 +71,7 @@ public class TestBookmarksTables { } @Test - public void testReplaceTextBefore() throws IOException { + void testReplaceTextBefore() throws IOException { try (HWPFDocument doc = openSampleFile( "pageref.doc" )) { Bookmark bookmark = doc.getBookmarks().getBookmark(0); Range range = new Range(bookmark.getStart(), bookmark.getEnd(), doc); @@ -85,7 +85,7 @@ public class TestBookmarksTables { } @Test - public void testUpdateText() throws IOException { + void testUpdateText() throws IOException { try (HWPFDocument doc = openSampleFile( "pageref.doc" )) { Bookmark bookmark = doc.getBookmarks().getBookmark(0); Range range = new Range(bookmark.getStart(), bookmark.getEnd(), doc); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java index da484011b8..3ad7ca5e81 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java @@ -40,7 +40,7 @@ public final class TestCHPBinTable { }; @Test - public void testReadWrite() throws Exception { + void testReadWrite() throws Exception { FileInformationBlock fib = _hWPFDocFixture._fib; byte[] mainStream = _hWPFDocFixture._mainStream; byte[] tableStream = _hWPFDocFixture._tableStream; diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestDocumentProperties.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestDocumentProperties.java index fed128d6bc..4be4cf7d05 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestDocumentProperties.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestDocumentProperties.java @@ -47,7 +47,7 @@ public final class TestDocumentProperties { } @Test - public void testReadWrite() throws Exception { + void testReadWrite() throws Exception { int size = DOPAbstractType.getSize(); byte[] buf = new byte[size]; _documentProperties.serialize(buf, 0); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFileInformationBlock.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFileInformationBlock.java index e32b23a70c..8450381045 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFileInformationBlock.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFileInformationBlock.java @@ -30,7 +30,7 @@ public final class TestFileInformationBlock { private HWPFDocFixture _hWPFDocFixture; @Test - public void testReadWrite() throws Exception { + void testReadWrite() throws Exception { final FibBase expected = _fileInformationBlock.getFibBase(); int size = _fileInformationBlock.getSize(); byte[] buf = new byte[size]; diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFontTable.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFontTable.java index f3b656513b..6e7c0f4cd7 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFontTable.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFontTable.java @@ -33,7 +33,7 @@ public final class TestFontTable { private HWPFDocFixture _hWPFDocFixture; @Test - public void testReadWrite() throws IOException { + void testReadWrite() throws IOException { FileInformationBlock fib = _hWPFDocFixture._fib; byte[] tableStream = _hWPFDocFixture._tableStream; diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestListTables.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestListTables.java index 2a93a32ca2..b04b17b897 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestListTables.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestListTables.java @@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test; public final class TestListTables extends HWPFTestCase { @Test - public void testReadWrite() throws IOException { + void testReadWrite() throws IOException { FileInformationBlock fib = _hWPFDocFixture._fib; byte[] tableStream = _hWPFDocFixture._tableStream; diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestNotesTables.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestNotesTables.java index 56248c7730..3aff17d62a 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestNotesTables.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestNotesTables.java @@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test; */ public class TestNotesTables { @Test - public void test() + void test() { HWPFDocument doc = HWPFTestDataSamples .openSampleFile( "endingnote.doc" ); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPAPBinTable.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPAPBinTable.java index d9ec8226d4..9cf77812fe 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPAPBinTable.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPAPBinTable.java @@ -32,13 +32,13 @@ import org.junit.jupiter.api.Test; public final class TestPAPBinTable { @Test - public void testObIs() throws IOException { + void testObIs() throws IOException { // shall not fail with assertions on HWPFTestDataSamples.openSampleFile( "ob_is.doc" ).close(); } @Test - public void testReadWrite() throws IOException { + void testReadWrite() throws IOException { /** @todo verify the constructors */ HWPFDocFixture _hWPFDocFixture = new HWPFDocFixture( this, HWPFDocFixture.DEFAULT_TEST_FILE ); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java index 26beb16031..809a283dcc 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java @@ -30,7 +30,7 @@ public final class TestPlexOfCps { private HWPFDocFixture _hWPFDocFixture; @Test - public void testWriteRead() { + void testWriteRead() { _plexOfCps = new PlexOfCps(4); int last = 0; diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestRevisionMarkAuthorTable.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestRevisionMarkAuthorTable.java index 9cfe9176af..9ffebae0cd 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestRevisionMarkAuthorTable.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestRevisionMarkAuthorTable.java @@ -33,7 +33,7 @@ public final class TestRevisionMarkAuthorTable { * Tests that an empty file doesn't have one */ @Test - public void testEmptyDocument() { + void testEmptyDocument() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("empty.doc"); RevisionMarkAuthorTable rmt = doc.getRevisionMarkAuthorTable(); @@ -45,7 +45,7 @@ public final class TestRevisionMarkAuthorTable { * only simple entries in the table */ @Test - public void testSimpleDocument() { + void testSimpleDocument() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("two_images.doc"); RevisionMarkAuthorTable rmt = doc.getRevisionMarkAuthorTable(); @@ -62,7 +62,7 @@ public final class TestRevisionMarkAuthorTable { * Several authors, one of whom has no name */ @Test - public void testMultipleAuthors() { + void testMultipleAuthors() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("MarkAuthorsTable.doc"); RevisionMarkAuthorTable rmt = doc.getRevisionMarkAuthorTable(); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSavedByTable.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSavedByTable.java index 3b1d55e3eb..0ae2e4a87a 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSavedByTable.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSavedByTable.java @@ -57,7 +57,7 @@ public final class TestSavedByTable { * @throws Exception if an unexpected error occurs. */ @Test - public void testReadWrite() throws IOException { + void testReadWrite() throws IOException { // This document is widely available on the internet as "blair.doc". // I tried stripping the content and saving the document but my version // of Word (from Office XP) strips this table out. diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSectionTable.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSectionTable.java index 56ff4d116a..a849ef4044 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSectionTable.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSectionTable.java @@ -32,7 +32,7 @@ public final class TestSectionTable { private HWPFDocFixture _hWPFDocFixture; @Test - public void testReadWrite() throws Exception { + void testReadWrite() throws Exception { FileInformationBlock fib = _hWPFDocFixture._fib; byte[] mainStream = _hWPFDocFixture._mainStream; byte[] tableStream = _hWPFDocFixture._tableStream; diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestStyleSheet.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestStyleSheet.java index c32d1ea0a3..eecec2b80e 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestStyleSheet.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestStyleSheet.java @@ -33,7 +33,7 @@ public final class TestStyleSheet { private HWPFDocFixture _hWPFDocFixture; @Test - public void testReadWrite() throws IOException + void testReadWrite() throws IOException { HWPFFileSystem fileSys = new HWPFFileSystem(); @@ -50,7 +50,7 @@ public final class TestStyleSheet { } @Test - public void testReadWriteFromNonZeroOffset() throws IOException + void testReadWriteFromNonZeroOffset() throws IOException { HWPFFileSystem fileSys = new HWPFFileSystem(); ByteArrayOutputStream tableOut = fileSys.getStream("1Table"); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestTextPieceTable.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestTextPieceTable.java index 913ab206f0..ed4d858d25 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestTextPieceTable.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestTextPieceTable.java @@ -57,7 +57,7 @@ public final class TestTextPieceTable { } @Test - public void testReadWrite() throws Exception { + void testReadWrite() throws Exception { FileInformationBlock fib = _hWPFDocFixture._fib; byte[] mainStream = _hWPFDocFixture._mainStream; byte[] tableStream = _hWPFDocFixture._tableStream; @@ -88,7 +88,7 @@ public final class TestTextPieceTable { * Check that we do the positions correctly when working with pure-ascii */ @Test - public void testAsciiParts() throws Exception { + void testAsciiParts() throws Exception { HWPFDocument doc = HWPFTestDataSamples .openSampleFile("ThreeColHeadFoot.doc"); TextPieceTable tbl = doc.getTextTable(); @@ -122,7 +122,7 @@ public final class TestTextPieceTable { * unicode file */ @Test - public void testUnicodeParts() throws Exception { + void testUnicodeParts() throws Exception { HWPFDocument doc = HWPFTestDataSamples .openSampleFile("HeaderFooterUnicode.doc"); TextPieceTable tbl = doc.getTextTable(); @@ -189,7 +189,7 @@ public final class TestTextPieceTable { } @Test - public void test56549_CharIndexRange() { + void test56549_CharIndexRange() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("ThreeColHeadFoot.doc"); // there is one range from 2048 - 2387 diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LFOLVLBaseAbstractTypeTest.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LFOLVLBaseAbstractTypeTest.java index 470d0b6d3c..3cae7ce951 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LFOLVLBaseAbstractTypeTest.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LFOLVLBaseAbstractTypeTest.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test; */ public class LFOLVLBaseAbstractTypeTest { @Test - public void testGetSize() { + void testGetSize() { assertEquals( 8, LFOLVLBaseAbstractType.getSize() ); } diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LVLFAbstractTypeTest.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LVLFAbstractTypeTest.java index fbc8ab648e..2f3d1d90a5 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LVLFAbstractTypeTest.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LVLFAbstractTypeTest.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test; */ public class LVLFAbstractTypeTest { @Test - public void testGetSize() { + void testGetSize() { assertEquals( 28, LVLFAbstractType.getSize() ); } diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/sprm/TableSprmUncompressorTest.java b/src/scratchpad/testcases/org/apache/poi/hwpf/sprm/TableSprmUncompressorTest.java index 1df6e45cd4..e403786fbe 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/sprm/TableSprmUncompressorTest.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/sprm/TableSprmUncompressorTest.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test; public class TableSprmUncompressorTest { @Test - public void testSprmTDefTable() { + void testSprmTDefTable() { final byte[] example = { (byte) 0x08, (byte) 0xD6, (byte) 0x2F, (byte) 0x00, (byte) 0x02, (byte) 0x94, (byte) 0xFF, (byte) 0x53, (byte) 0x03, (byte) 0x60, (byte) 0x13, diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/sprm/TestSprms.java b/src/scratchpad/testcases/org/apache/poi/hwpf/sprm/TestSprms.java index c9d57b3a27..65c5dac5a8 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/sprm/TestSprms.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/sprm/TestSprms.java @@ -48,7 +48,7 @@ public class TestSprms { * (0x2416) */ @Test - public void testInnerTable() throws Exception { + void testInnerTable() throws Exception { InputStream resourceAsStream = POIDataSamples.getDocumentInstance() .openResourceAsStream( "innertable.doc" ); try (HWPFDocument hwpfDocument = new HWPFDocument( resourceAsStream )) { @@ -86,7 +86,7 @@ public class TestSprms { * Test correct processing of "sprmPJc" by uncompressor */ @Test - public void testSprmPJc() throws IOException { + void testSprmPJc() throws IOException { try (InputStream resourceAsStream = POIDataSamples.getDocumentInstance() .openResourceAsStream( "Bug49820.doc" ); HWPFDocument hwpfDocument = new HWPFDocument( resourceAsStream )) { diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBorderCode.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBorderCode.java index 9ada74499e..8c998ebd62 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBorderCode.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBorderCode.java @@ -34,7 +34,7 @@ public final class TestBorderCode { private Range range; @Test - public void test() { + void test() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug49919.doc"); range = doc.getRange(); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBug46610.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBug46610.java index 739fb7b498..a886141f2f 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBug46610.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBug46610.java @@ -27,19 +27,19 @@ import org.junit.jupiter.api.Test; public final class TestBug46610 { @Test - public void testUtf() throws Exception { + void testUtf() throws Exception { String text = runExtract("Bug46610_1.doc"); assertNotNull(text); } @Test - public void testUtf2() throws Exception { + void testUtf2() throws Exception { String text = runExtract("Bug46610_2.doc"); assertNotNull(text); } @Test - public void testExtraction() throws Exception { + void testExtraction() throws Exception { String text = runExtract("Bug46610_3.doc"); assertContains(text, "\u0421\u0412\u041e\u042e"); } diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBug47563.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBug47563.java index 4a74bb9a35..f0e17acf76 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBug47563.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBug47563.java @@ -53,7 +53,7 @@ public class TestBug47563 { @ParameterizedTest @MethodSource("data") - public void test(int rows, int columns) throws Exception { + void test(int rows, int columns) throws Exception { // POI apparently can't create a document from scratch, // so we need an existing empty dummy document try (HWPFDocument doc = HWPFTestDataSamples.openSampleFile("empty.doc")) { diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBug49820.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBug49820.java index f50ccdf3ac..5028a85e6b 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBug49820.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBug49820.java @@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test; public final class TestBug49820 { @Test - public void test() throws IOException { + void test() throws IOException { try (HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug49820.doc")) { Range documentRange = doc.getRange(); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBug50075.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBug50075.java index e46e873ffa..12b70fb446 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBug50075.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBug50075.java @@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test; public class TestBug50075 { @Test - public void test() throws IOException { + void test() throws IOException { try (HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug50075.doc")) { Range range = doc.getRange(); assertEquals(1, range.numParagraphs()); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBugs.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBugs.java index 035e7f0bb0..070ec63831 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBugs.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBugs.java @@ -117,7 +117,7 @@ public class TestBugs{ * Bug 33519 - HWPF fails to read a file */ @Test - public void test33519() throws IOException { + void test33519() throws IOException { assertNotNull(getText("Bug33519.doc")); } @@ -125,7 +125,7 @@ public class TestBugs{ * Bug 34898 - WordExtractor doesn't read the whole string from the file */ @Test - public void test34898() throws IOException { + void test34898() throws IOException { assertEqualsIgnoreNewline("\u30c7\u30a3\u30ec\u30af\u30c8\u30ea", getText("Bug34898.doc").trim()); } @@ -133,7 +133,7 @@ public class TestBugs{ * [RESOLVED INVALID] 41898 - Word 2003 pictures cannot be extracted */ @Test - public void test41898() throws IOException { + void test41898() throws IOException { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug41898.doc"); List pics = doc.getPicturesTable().getAllPictures(); @@ -167,7 +167,7 @@ public class TestBugs{ */ @SuppressWarnings("deprecation") @Test - public void test44431() throws IOException { + void test44431() throws IOException { HWPFDocument doc1 = HWPFTestDataSamples.openSampleFile("Bug44431.doc"); WordExtractor extractor1 = new WordExtractor(doc1); @@ -192,7 +192,7 @@ public class TestBugs{ * Bug 44331 - HWPFDocument.write destroys fields */ @Test - public void test44431_2() throws IOException { + void test44431_2() throws IOException { assertEqualsIgnoreNewline("File name=FieldsTest.doc\n" + "\n" + "\n" + @@ -219,7 +219,7 @@ public class TestBugs{ * Bug 45473 - HWPF cannot read file after save */ @Test - public void test45473() throws IOException { + void test45473() throws IOException { // Fetch the current text HWPFDocument doc1 = HWPFTestDataSamples.openSampleFile("Bug45473.doc"); WordExtractor wordExtractor = new WordExtractor(doc1); @@ -252,7 +252,7 @@ public class TestBugs{ * Bug 46220 - images are not properly extracted */ @Test - public void test46220() throws IOException { + void test46220() throws IOException { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug46220.doc"); // reference checksums as in Bugzilla String[] md5 = { "851be142bce6d01848e730cb6903f39e", @@ -276,7 +276,7 @@ public class TestBugs{ * missing */ @Test - public void test46817() throws IOException { + void test46817() throws IOException { String text = getText("Bug46817.doc").trim(); assertContains(text, "Nazwa wykonawcy"); @@ -289,7 +289,7 @@ public class TestBugs{ * contains form elements */ @Test - public void test47286() throws IOException { + void test47286() throws IOException { // Fetch the current text HWPFDocument doc1 = HWPFTestDataSamples.openSampleFile("Bug47286.doc"); WordExtractor wordExtractor = new WordExtractor(doc1); @@ -328,7 +328,7 @@ public class TestBugs{ * CharacterRun.replaceText() */ @Test - public void test47287() { + void test47287() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug47287.doc"); String[] values = { "1-1", "1-2", "1-3", "1-4", "1-5", "1-6", "1-7", "1-8", "1-9", "1-10", "1-11", "1-12", "1-13", "1-14", "1-15", }; @@ -403,7 +403,7 @@ public class TestBugs{ * some website as an embedded object */ @Test - public void test47731() throws Exception { + void test47731() throws Exception { String foundText = getText("Bug47731.doc"); assertContains(foundText, "Soak the rice in water for three to four hours"); @@ -413,7 +413,7 @@ public class TestBugs{ * Bug 4774 - text extracted by WordExtractor is broken */ @Test - public void test47742() throws Exception { + void test47742() throws Exception { // (1) extract text from MS Word document via POI String foundText = getText("Bug47742.doc"); @@ -433,7 +433,7 @@ public class TestBugs{ * Bug 47958 - Exception during Escher walk of pictures */ @Test - public void test47958() { + void test47958() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug47958.doc"); doc.getPicturesTable().getAllPictures(); } @@ -443,7 +443,7 @@ public class TestBugs{ * formatting) */ @Test - public void test48065() { + void test48065() { HWPFDocument doc1 = HWPFTestDataSamples.openSampleFile("Bug48065.doc"); HWPFDocument doc2 = HWPFTestDataSamples.writeOutAndReadBack(doc1); @@ -458,7 +458,7 @@ public class TestBugs{ } @Test - public void test49933() throws IOException { + void test49933() throws IOException { try (HWPFOldDocument doc = HWPFTestDataSamples.openOldSampleFile("Bug49933.doc"); Word6Extractor extractor = new Word6Extractor(doc)) { assertContains(extractor.getText(), "best.wine.jump.ru"); @@ -469,7 +469,7 @@ public class TestBugs{ * Bug 50936 - Exception parsing MS Word 8.0 file */ @Test - public void test50936() throws Exception { + void test50936() throws Exception { String[] filenames = {"Bug50936_1.doc", "Bug50936_2.doc", "Bug50936_3.doc"}; for (String filename : filenames) { HWPFDocument hwpfDocument = HWPFTestDataSamples.openSampleFile(filename); @@ -485,7 +485,7 @@ public class TestBugs{ * release from download site ) */ @Test - public void test51604() { + void test51604() { HWPFDocument document = HWPFTestDataSamples .openSampleFile("Bug51604.doc"); @@ -514,7 +514,7 @@ public class TestBugs{ * release from download site ) */ @Test - public void test51604p2() { + void test51604p2() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug51604.doc"); Range range = doc.getRange(); @@ -558,7 +558,7 @@ public class TestBugs{ * release from download site ) */ @Test - public void test51604p3() throws Exception { + void test51604p3() throws Exception { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug51604.doc"); FileInformationBlock fib = doc.getFileInformationBlock(); @@ -589,7 +589,7 @@ public class TestBugs{ * throws a NullPointerException */ @Test - public void test51671() throws Exception { + void test51671() throws Exception { InputStream is = POIDataSamples.getDocumentInstance() .openResourceAsStream("empty.doc"); try (POIFSFileSystem poifsFileSystem = new POIFSFileSystem(is)) { @@ -605,7 +605,7 @@ public class TestBugs{ * PapBinTable constructor is slow */ @Test - public void test51678And51524() throws IOException { + void test51678And51524() throws IOException { // YK: the test will run only if the poi.test.remote system property is // set. // TODO: refactor into something nicer! @@ -626,7 +626,7 @@ public class TestBugs{ * ArrayIndexOutOfBoundsException */ @Test - public void testBug51890() { + void testBug51890() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug51890.doc"); for (Picture picture : doc.getPicturesTable().getAllPictures() ) { @@ -642,7 +642,7 @@ public class TestBugs{ * corrupt document */ @Test - public void testBug51834() { + void testBug51834() { /* * we don't have Java test for this file - it should be checked using * Microsoft BFF Validator. But check read-write-read anyway. -- sergey @@ -656,7 +656,7 @@ public class TestBugs{ * Bug 51944 - PAPFormattedDiskPage.getPAPX - IndexOutOfBounds */ @Test - public void testBug51944() throws Exception { + void testBug51944() throws Exception { HWPFOldDocument doc = HWPFTestDataSamples.openOldSampleFile("Bug51944.doc"); assertNotNull(WordToTextConverter.getText(doc)); } @@ -666,7 +666,7 @@ public class TestBugs{ * with no stack trace (broken after revision 1178063) */ @Test - public void testBug52032_1() throws Exception { + void testBug52032_1() throws Exception { assertNotNull(getText("Bug52032_1.doc")); } @@ -675,7 +675,7 @@ public class TestBugs{ * with no stack trace (broken after revision 1178063) */ @Test - public void testBug52032_2() throws Exception { + void testBug52032_2() throws Exception { assertNotNull(getText("Bug52032_2.doc")); } @@ -684,7 +684,7 @@ public class TestBugs{ * with no stack trace (broken after revision 1178063) */ @Test - public void testBug52032_3() throws Exception { + void testBug52032_3() throws Exception { assertNotNull(getText("Bug52032_3.doc")); } @@ -692,7 +692,7 @@ public class TestBugs{ * Bug 53380 - ArrayIndexOutOfBounds Exception parsing word 97 document */ @Test - public void testBug53380_1() throws Exception { + void testBug53380_1() throws Exception { assertNotNull(getText("Bug53380_1.doc")); } @@ -700,7 +700,7 @@ public class TestBugs{ * Bug 53380 - ArrayIndexOutOfBounds Exception parsing word 97 document */ @Test - public void testBug53380_2() throws Exception + void testBug53380_2() throws Exception { assertNotNull(getText("Bug53380_2.doc")); } @@ -709,7 +709,7 @@ public class TestBugs{ * Bug 53380 - ArrayIndexOutOfBounds Exception parsing word 97 document */ @Test - public void testBug53380_3() throws Exception { + void testBug53380_3() throws Exception { assertNotNull(getText("Bug53380_3.doc")); } @@ -717,7 +717,7 @@ public class TestBugs{ * Bug 53380 - ArrayIndexOutOfBounds Exception parsing word 97 document */ @Test - public void testBug53380_4() throws Exception { + void testBug53380_4() throws Exception { assertNotNull(getText("Bug53380_4.doc")); } @@ -728,7 +728,7 @@ public class TestBugs{ * Disabled pending a fix for the bug */ @Test - public void test56880() { + void test56880() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("56880.doc"); assertEqualsIgnoreNewline("Check Request", doc.getRange().text()); @@ -738,7 +738,7 @@ public class TestBugs{ * Bug 61268 - NegativeArraySizeException parsing word 97 document */ @Test - public void testBug61268() throws Exception { + void testBug61268() throws Exception { assertNotNull(getText("Bug61268.doc")); } @@ -749,7 +749,7 @@ public class TestBugs{ @Test @SuppressWarnings("SuspiciousNameCombination") - public void testHWPFSections() { + void testHWPFSections() { HWPFDocument document = HWPFTestDataSamples.openSampleFile("Bug53453Section.doc"); Range overallRange = document.getOverallRange(); int numParas = overallRange.numParagraphs(); @@ -825,20 +825,20 @@ public class TestBugs{ } @Test - public void testRegressionIn315beta2() { + void testRegressionIn315beta2() { HWPFDocument hwpfDocument = HWPFTestDataSamples.openSampleFile("cap.stanford.edu_profiles_viewbiosketch_facultyid=4009&name=m_maciver.doc"); assertNotNull(hwpfDocument); } @Test - public void test57603SevenRowTable() throws Exception { + void test57603SevenRowTable() throws Exception { try (HWPFDocument hwpfDocument = HWPFTestDataSamples.openSampleFile("57603-seven_columns.doc")) { assertThrows(ArrayIndexOutOfBoundsException.class, () -> HWPFTestDataSamples.writeOutAndReadBack(hwpfDocument)); } } @Test - public void test57843() throws IOException { + void test57843() throws IOException { File f = POIDataSamples.getDocumentInstance().getFile("57843.doc"); try (POIFSFileSystem fs = new POIFSFileSystem(f, true)) { HWPFOldDocument doc = new HWPFOldDocument(fs); @@ -848,13 +848,13 @@ public class TestBugs{ } @Test - public void testCommonCrawlRegression() throws IOException { + void testCommonCrawlRegression() throws IOException { HWPFDocument document = HWPFTestDataSamples.openSampleFile("ca.kwsymphony.www_education_School_Concert_Seat_Booking_Form_2011-12.doc"); document.close(); } @Test - public void test61911() throws IOException { + void test61911() throws IOException { HWPFDocument document = HWPFTestDataSamples.openSampleFile("61911.doc"); PicturesTable picturesTable = document.getPicturesTable(); @@ -866,7 +866,7 @@ public class TestBugs{ } @Test - public void test61490CellCountInTable() throws Exception { + void test61490CellCountInTable() throws Exception { try(HWPFDocument doc = HWPFTestDataSamples.openSampleFile("61490.doc")){ Range range = doc.getRange(); @@ -884,7 +884,7 @@ public class TestBugs{ } @Test - public void test59322() throws Exception { + void test59322() throws Exception { try(HWPFDocument doc = HWPFTestDataSamples.openSampleFile("59322.doc")) { Document document = XMLHelper.newDocumentBuilder().newDocument(); WordToHtmlConverter wordToHtmlConverter = new WordToHtmlConverter(document); @@ -894,7 +894,7 @@ public class TestBugs{ } @Test - public void test64132() throws IOException { + void test64132() throws IOException { try(HWPFDocument doc = HWPFTestDataSamples.openSampleFile("64132.doc")) { assertNotNull(doc); PicturesTable picturesTable = doc.getPicturesTable(); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHWPFOldDocument.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHWPFOldDocument.java index a5ca067fec..c34b31982e 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHWPFOldDocument.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHWPFOldDocument.java @@ -42,13 +42,13 @@ public final class TestHWPFOldDocument extends HWPFTestCase { * Test a simple Word 6 document */ @Test - public void testWord6hwpf() { + void testWord6hwpf() { // Can't open as HWPFDocument assertThrows(OldFileFormatException.class, () -> openSampleFile("Word6.doc")); } @Test - public void testWord6hwpfOld() throws IOException { + void testWord6hwpfOld() throws IOException { // Open HWPFOldDocument doc = openOldSampleFile("Word6.doc"); @@ -66,13 +66,13 @@ public final class TestHWPFOldDocument extends HWPFTestCase { * Test a simple Word 2 document */ @Test - public void testWord2hwpf() { + void testWord2hwpf() { // Can't open as HWPFDocument assertThrows(IllegalArgumentException.class, () -> openSampleFile("word2.doc")); } @Test - public void testWord2hwpfOld() { + void testWord2hwpfOld() { // Open assertThrows(RuntimeException.class, () -> openOldSampleFile("word2.doc")); } @@ -81,13 +81,13 @@ public final class TestHWPFOldDocument extends HWPFTestCase { * Test a simple Word 95 document */ @Test - public void testWord95hwpf() { + void testWord95hwpf() { // Can't open as HWPFDocument assertThrows(OldFileFormatException.class, () -> openSampleFile("Word95.doc")); } @Test - public void testWord95hwpfOld() throws IOException { + void testWord95hwpfOld() throws IOException { // Open HWPFOldDocument doc = openOldSampleFile("Word95.doc"); @@ -126,7 +126,7 @@ public final class TestHWPFOldDocument extends HWPFTestCase { * stuff. */ @Test - public void testWord6Sections() throws IOException { + void testWord6Sections() throws IOException { HWPFOldDocument doc = openOldSampleFile("Word6_sections.doc"); assertEquals(3, doc.getRange().numSections()); @@ -150,7 +150,7 @@ public final class TestHWPFOldDocument extends HWPFTestCase { * properties set on it */ @Test - public void testWord6Sections2() throws IOException { + void testWord6Sections2() throws IOException { HWPFOldDocument doc = openOldSampleFile("Word6_sections2.doc"); assertEquals(1, doc.getRange().numSections()); @@ -163,7 +163,7 @@ public final class TestHWPFOldDocument extends HWPFTestCase { } @Test - public void testDefaultCodePageEncoding() throws IOException { + void testDefaultCodePageEncoding() throws IOException { HWPFOldDocument doc = openOldSampleFile("Bug60942.doc"); Word6Extractor ex = new Word6Extractor(doc); String txt = ex.getText(); @@ -177,7 +177,7 @@ public final class TestHWPFOldDocument extends HWPFTestCase { @Test - public void testCodePageBug50955() throws IOException { + void testCodePageBug50955() throws IOException { //windows 1251 HWPFOldDocument doc = openOldSampleFile("Bug50955.doc"); Word6Extractor ex = new Word6Extractor(doc); @@ -192,7 +192,7 @@ public final class TestHWPFOldDocument extends HWPFTestCase { } @Test - public void testCodePageBug60936() throws IOException { + void testCodePageBug60936() throws IOException { //windows 1250 -- this test file was generated with OpenOffice //see https://bz.apache.org/ooo/show_bug.cgi?id=12445 for the inspiration @@ -209,7 +209,7 @@ public final class TestHWPFOldDocument extends HWPFTestCase { } @Test - public void testOldFontTableEncoding() throws IOException { + void testOldFontTableEncoding() throws IOException { HWPFOldDocument doc = openOldSampleFile("Bug51944.doc"); OldFontTable oldFontTable = doc.getOldFontTable(); assertEquals(5, oldFontTable.getFontNames().length); @@ -221,7 +221,7 @@ public final class TestHWPFOldDocument extends HWPFTestCase { } @Test - public void testOldFontTableAltName() { + void testOldFontTableAltName() { HWPFOldDocument doc = openOldSampleFile("Bug60942b.doc"); OldFontTable oldFontTable = doc.getOldFontTable(); assertEquals(5, oldFontTable.getFontNames().length); @@ -233,7 +233,7 @@ public final class TestHWPFOldDocument extends HWPFTestCase { @Test - public void test51944() throws IOException { + void test51944() throws IOException { HWPFOldDocument doc = openOldSampleFile("Bug51944.doc"); Word6Extractor ex = new Word6Extractor(doc); StringBuilder sb = new StringBuilder(); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHWPFWrite.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHWPFWrite.java index 822672b461..3f0f8b7ce0 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHWPFWrite.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHWPFWrite.java @@ -47,7 +47,7 @@ public final class TestHWPFWrite extends HWPFTestCase { * Write to a stream */ @Test - public void testWriteStream() throws IOException { + void testWriteStream() throws IOException { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("SampleDoc.doc"); Range r = doc.getRange(); @@ -68,7 +68,7 @@ public final class TestHWPFWrite extends HWPFTestCase { * Write to a new file */ @Test - public void testWriteNewFile() throws IOException { + void testWriteNewFile() throws IOException { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("SampleDoc.doc"); Range r = doc.getRange(); @@ -95,7 +95,7 @@ public final class TestHWPFWrite extends HWPFTestCase { * changing our test files! */ @Test - public void testInPlaceWrite() throws Exception { + void testInPlaceWrite() throws Exception { // Setup as a copy of a known-good file final File file = TempFile.createTempFile("TestDocument", ".doc"); try (InputStream inputStream = SAMPLES.openResourceAsStream("SampleDoc.doc"); @@ -126,7 +126,7 @@ public final class TestHWPFWrite extends HWPFTestCase { } @Test - public void testInvalidInPlaceWriteInputStream() throws IOException { + void testInvalidInPlaceWriteInputStream() throws IOException { // Can't work for InputStream opened files try (InputStream is = SAMPLES.openResourceAsStream("SampleDoc.doc"); @@ -136,7 +136,7 @@ public final class TestHWPFWrite extends HWPFTestCase { } @Test - public void testInvalidInPlaceWritePOIFS() throws Exception { + void testInvalidInPlaceWritePOIFS() throws Exception { // Can't work for Read-Only files try (POIFSFileSystem fs = new POIFSFileSystem(SAMPLES.getFile("SampleDoc.doc"), true); HWPFDocument doc = new HWPFDocument(fs.getRoot())) { diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHeaderStories.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHeaderStories.java index f8167e0608..331cc4fdeb 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHeaderStories.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHeaderStories.java @@ -54,7 +54,7 @@ public final class TestHeaderStories { } @Test - public void testNone() { + void testNone() { HeaderStories hs = new HeaderStories(none); assertNull(hs.getPlcfHdd()); @@ -62,7 +62,7 @@ public final class TestHeaderStories { } @Test - public void testHeader() { + void testHeader() { HeaderStories hs = new HeaderStories(header); assertEquals(60, hs.getRange().text().length()); @@ -107,7 +107,7 @@ public final class TestHeaderStories { } @Test - public void testFooter() { + void testFooter() { HeaderStories hs = new HeaderStories(footer); assertEquals("", hs.getFirstHeader()); @@ -120,7 +120,7 @@ public final class TestHeaderStories { } @Test - public void testHeaderFooter() { + void testHeaderFooter() { HeaderStories hs = new HeaderStories(headerFooter); assertEquals("", hs.getFirstHeader()); @@ -133,7 +133,7 @@ public final class TestHeaderStories { } @Test - public void testOddEven() { + void testOddEven() { HeaderStories hs = new HeaderStories(oddEven); assertEquals("", hs.getFirstHeader()); @@ -156,7 +156,7 @@ public final class TestHeaderStories { } @Test - public void testFirst() { + void testFirst() { HeaderStories hs = new HeaderStories(diffFirst); assertEquals("I am the header on the first page, and I\u2019m nice and simple\r\r", hs @@ -174,7 +174,7 @@ public final class TestHeaderStories { } @Test - public void testUnicode() { + void testUnicode() { HeaderStories hs = new HeaderStories(unicode); assertEquals("", hs.getFirstHeader()); @@ -188,7 +188,7 @@ public final class TestHeaderStories { } @Test - public void testWithFields() { + void testWithFields() { HeaderStories hs = new HeaderStories(withFields); assertFalse(hs.areFieldsStripped()); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestLists.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestLists.java index 93e76fc80a..28fb2a6568 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestLists.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestLists.java @@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test; */ public final class TestLists { @Test - public void testBasics() throws IOException { + void testBasics() throws IOException { try (HWPFDocument doc = openSampleFile("Lists.doc")) { Range r = doc.getRange(); @@ -52,7 +52,7 @@ public final class TestLists { } @Test - public void testUnorderedLists() throws IOException { + void testUnorderedLists() throws IOException { try (HWPFDocument doc = openSampleFile("Lists.doc")) { Range r = doc.getRange(); assertEquals(40, r.numParagraphs()); @@ -96,7 +96,7 @@ public final class TestLists { } @Test - public void testOrderedLists() throws IOException { + void testOrderedLists() throws IOException { try (HWPFDocument doc = openSampleFile("Lists.doc")) { Range r = doc.getRange(); assertEquals(40, r.numParagraphs()); @@ -122,7 +122,7 @@ public final class TestLists { } @Test - public void testMultiLevelLists() throws IOException { + void testMultiLevelLists() throws IOException { try (HWPFDocument doc = openSampleFile("Lists.doc")) { Range r = doc.getRange(); assertEquals(40, r.numParagraphs()); @@ -181,7 +181,7 @@ public final class TestLists { } @Test - public void testIndentedText() throws IOException { + void testIndentedText() throws IOException { try (HWPFDocument doc = openSampleFile("Lists.doc")) { Range r = doc.getRange(); @@ -211,7 +211,7 @@ public final class TestLists { } @Test - public void testWriteRead() throws IOException { + void testWriteRead() throws IOException { try (HWPFDocument doc = openSampleFile("Lists.doc"); HWPFDocument doc2 = HWPFTestDataSamples.writeOutAndReadBack(doc)) { @@ -228,7 +228,7 @@ public final class TestLists { } @Test - public void testSpecificNumberedOrderedListFeatures() throws IOException { + void testSpecificNumberedOrderedListFeatures() throws IOException { try (HWPFDocument doc = openSampleFile("Lists.doc")) { Range r = doc.getRange(); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestOfficeDrawings.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestOfficeDrawings.java index 5358ba4ecc..c8974d4d15 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestOfficeDrawings.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestOfficeDrawings.java @@ -34,7 +34,7 @@ public class TestOfficeDrawings { * Tests watermark text extraction */ @Test - public void testWatermark() throws Exception { + void testWatermark() throws Exception { try (HWPFDocument hwpfDocument = openSampleFile("watermark.doc")) { OfficeDrawing drawing = hwpfDocument.getOfficeDrawingsHeaders().getOfficeDrawings().iterator().next(); EscherContainerRecord escherContainerRecord = drawing.getOfficeArtSpContainer(); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestPictures.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestPictures.java index 061ba37729..077259623c 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestPictures.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestPictures.java @@ -44,7 +44,7 @@ public final class TestPictures { * two jpegs */ @Test - public void testTwoImages() { + void testTwoImages() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("two_images.doc"); List pics = doc.getPicturesTable().getAllPictures(); @@ -66,7 +66,7 @@ public final class TestPictures { * pngs and jpegs */ @Test - public void testDifferentImages() { + void testDifferentImages() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("testPictures.doc"); List pics = doc.getPicturesTable().getAllPictures(); @@ -95,7 +95,7 @@ public final class TestPictures { * emf image, nice and simple */ @Test - public void testEmfImage() { + void testEmfImage() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("vector_image.doc"); List pics = doc.getPicturesTable().getAllPictures(); @@ -117,7 +117,7 @@ public final class TestPictures { } @Test - public void testPicturesWithTable() { + void testPicturesWithTable() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug44603.doc"); List pics = doc.getPicturesTable().getAllPictures(); @@ -125,7 +125,7 @@ public final class TestPictures { } @Test - public void testPicturesInHeader() { + void testPicturesInHeader() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("header_image.doc"); List pics = doc.getPicturesTable().getAllPictures(); @@ -133,21 +133,21 @@ public final class TestPictures { } @Test - public void testFastSaved() { + void testFastSaved() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("rasp.doc"); doc.getPicturesTable().getAllPictures(); // just check that we do not throw Exception } @Test - public void testFastSaved2() { + void testFastSaved2() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("o_kurs.doc"); doc.getPicturesTable().getAllPictures(); // just check that we do not throw Exception } @Test - public void testFastSaved3() { + void testFastSaved3() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("ob_is.doc"); doc.getPicturesTable().getAllPictures(); // just check that we do not throw Exception @@ -161,7 +161,7 @@ public final class TestPictures { * Check that we can properly read one of these */ @Test - public void testEmbededDocumentIcon() { + void testEmbededDocumentIcon() { // This file has two embeded excel files, an embeded powerpoint // file and an embeded word file, in that order HWPFDocument doc = HWPFTestDataSamples.openSampleFile("word_with_embeded.doc"); @@ -247,7 +247,7 @@ public final class TestPictures { } @Test - public void testEquation() + void testEquation() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile( "equation.doc" ); PicturesTable pictures = doc.getPicturesTable(); @@ -273,7 +273,7 @@ public final class TestPictures { * reference the same \u0001 */ @Test - public void testFloatingPictures() { + void testFloatingPictures() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("FloatingPictures.doc"); PicturesTable pictures = doc.getPicturesTable(); @@ -308,7 +308,7 @@ public final class TestPictures { @SuppressWarnings( "deprecation" ) @Test - public void testCroppedPictures() { + void testCroppedPictures() { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("testCroppedPictures.doc"); List pics = doc.getPicturesTable().getAllPictures(); @@ -339,7 +339,7 @@ public final class TestPictures { } @Test - public void testPictureDetectionWithPNG() { + void testPictureDetectionWithPNG() { HWPFDocument document = HWPFTestDataSamples.openSampleFile("PngPicture.doc"); PicturesTable pictureTable = document.getPicturesTable(); @@ -351,7 +351,7 @@ public final class TestPictures { } @Test - public void testPictureWithAlternativeText() { + void testPictureWithAlternativeText() { HWPFDocument document = HWPFTestDataSamples.openSampleFile("Picture_Alternative_Text.doc"); PicturesTable pictureTable = document.getPicturesTable(); Picture picture = pictureTable.getAllPictures().get(0); @@ -361,7 +361,7 @@ public final class TestPictures { @Disabled("This bug is not fixed yet") @Test - public void test58804_1() throws Exception { + void test58804_1() throws Exception { HWPFDocument docA = HWPFTestDataSamples.openSampleFile("58804_1.doc"); expectImages(docA, 1); @@ -377,7 +377,7 @@ public final class TestPictures { @Disabled("This bug is not fixed yet") @Test - public void test58804() throws Exception { + void test58804() throws Exception { HWPFDocument docA = HWPFTestDataSamples.openSampleFile("58804.doc"); expectImages(docA, 7); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestProblems.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestProblems.java index 8fa639ac0b..48938a08fc 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestProblems.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestProblems.java @@ -40,7 +40,7 @@ public final class TestProblems extends HWPFTestCase { * ListEntry passed no ListTable */ @Test - public void testListEntryNoListTable() throws IOException { + void testListEntryNoListTable() throws IOException { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("ListEntryNoListTable.doc"); Range r = doc.getRange(); @@ -58,7 +58,7 @@ public final class TestProblems extends HWPFTestCase { * AIOOB for TableSprmUncompressor.unCompressTAPOperation */ @Test - public void testSprmAIOOB() throws IOException { + void testSprmAIOOB() throws IOException { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("AIOOB-Tap.doc"); StyleSheet styleSheet = doc.getStyleSheet(); @@ -80,7 +80,7 @@ public final class TestProblems extends HWPFTestCase { * #44292 */ @Test - public void testTableCellLastParagraph() throws IOException { + void testTableCellLastParagraph() throws IOException { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug44292.doc"); Range r = doc.getRange(); assertEquals(6, r.numParagraphs()); @@ -150,7 +150,7 @@ public final class TestProblems extends HWPFTestCase { } @Test - public void testRangeDelete() throws IOException { + void testRangeDelete() throws IOException { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug28627.doc"); Range range = doc.getRange(); @@ -190,13 +190,13 @@ public final class TestProblems extends HWPFTestCase { * With an encrypted file, we should give a suitable exception, and not OOM */ @Test - public void testEncryptedFile() { + void testEncryptedFile() { assertThrows(EncryptedDocumentException.class, () -> HWPFTestDataSamples.openSampleFile("PasswordProtected.doc")); } @Test - public void testWriteProperties() throws IOException { + void testWriteProperties() throws IOException { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("SampleDoc.doc"); assertEquals("Nick Burch", doc.getSummaryInformation().getAuthor()); @@ -212,7 +212,7 @@ public final class TestProblems extends HWPFTestCase { * Range. Bug #45269 */ @Test - public void testReadParagraphsAfterReplaceText() throws IOException { + void testReadParagraphsAfterReplaceText() throws IOException { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug45269.doc"); Range range = doc.getRange(); @@ -251,7 +251,7 @@ public final class TestProblems extends HWPFTestCase { */ @SuppressWarnings("deprecation") @Test - public void testProblemHeaderStories49936() throws IOException { + void testProblemHeaderStories49936() throws IOException { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("HeaderFooterProblematic.doc"); HeaderStories hs = new HeaderStories(doc); @@ -274,7 +274,7 @@ public final class TestProblems extends HWPFTestCase { * Bug #45877 - problematic PAPX with no parent set */ @Test - public void testParagraphPAPXNoParent45877() throws IOException { + void testParagraphPAPXNoParent45877() throws IOException { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug45877.doc"); assertEquals(17, doc.getRange().numParagraphs()); @@ -290,7 +290,7 @@ public final class TestProblems extends HWPFTestCase { * Bug #48245 - don't include the text from the next cell in the current one */ @Test - public void testTableIterator() throws IOException { + void testTableIterator() throws IOException { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("simple-table2.doc"); Range r = doc.getRange(); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRange.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRange.java index 6f45170fd9..7d6c72fc6e 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRange.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRange.java @@ -37,7 +37,7 @@ public final class TestRange { private static final POIDataSamples SAMPLES = POIDataSamples.getDocumentInstance(); @Test - public void testFieldStripping() { + void testFieldStripping() { String exp = "This is some text."; String single = "This is some \u0013Blah!\u0015text."; @@ -63,7 +63,7 @@ public final class TestRange { } @Test - public void testBug46817() throws IOException { + void testBug46817() throws IOException { InputStream is = SAMPLES.openResourceAsStream( "Bug46817.doc" ); HWPFDocument hwpfDocument = new HWPFDocument( is ); is.close(); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeDelete.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeDelete.java index acf6b5597d..a265ff2694 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeDelete.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeDelete.java @@ -53,7 +53,7 @@ public final class TestRangeDelete { * Test just opening the files */ @Test - public void testOpen() throws IOException { + void testOpen() throws IOException { openSampleFile(illustrativeDocFile).close(); } @@ -61,7 +61,7 @@ public final class TestRangeDelete { * Test (more "confirm" than test) that we have the general structure that we expect to have. */ @Test - public void testDocStructure() throws IOException { + void testDocStructure() throws IOException { try (HWPFDocument daDoc = openSampleFile(illustrativeDocFile)) { Range range; @@ -128,7 +128,7 @@ public final class TestRangeDelete { * Test that we can delete text (one instance) from our Range with Unicode text. */ @Test - public void testRangeDeleteOne() throws IOException { + void testRangeDeleteOne() throws IOException { try (HWPFDocument daDoc = openSampleFile(illustrativeDocFile)) { Range range = daDoc.getOverallRange(); @@ -178,7 +178,7 @@ public final class TestRangeDelete { * Test that we can delete text (all instances of) from our Range with Unicode text. */ @Test - public void testRangeDeleteAll() throws IOException { + void testRangeDeleteAll() throws IOException { try (HWPFDocument daDoc = openSampleFile(illustrativeDocFile)) { Range range = daDoc.getRange(); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeInsertion.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeInsertion.java index 4c60d97a7c..f77f53fcbf 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeInsertion.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeInsertion.java @@ -45,7 +45,7 @@ public final class TestRangeInsertion { * Test just opening the files */ @Test - public void testOpen() throws IOException { + void testOpen() throws IOException { openSampleFile(illustrativeDocFile).close(); } @@ -53,7 +53,7 @@ public final class TestRangeInsertion { * Test (more "confirm" than test) that we have the general structure that we expect to have. */ @Test - public void testDocStructure() throws IOException { + void testDocStructure() throws IOException { try (HWPFDocument daDoc = openSampleFile(illustrativeDocFile)) { Range range = daDoc.getRange(); @@ -81,7 +81,7 @@ public final class TestRangeInsertion { * Test that we can insert text in our CharacterRun with Unicode text. */ @Test - public void testRangeInsertion() throws IOException { + void testRangeInsertion() throws IOException { try (HWPFDocument daDoc = openSampleFile(illustrativeDocFile)) { // if (false) { // TODO - delete or resurrect this code diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeProperties.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeProperties.java index ad194b3032..69a7853b55 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeProperties.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeProperties.java @@ -75,7 +75,7 @@ public final class TestRangeProperties { } @Test - public void testAsciiTextParagraphs() { + void testAsciiTextParagraphs() { Range r = a.getRange(); assertEquals( a_page_1 + @@ -131,7 +131,7 @@ public final class TestRangeProperties { } @Test - public void testAsciiStyling() { + void testAsciiStyling() { Range r = a.getRange(); Paragraph p1 = r.getParagraph(0); @@ -174,7 +174,7 @@ public final class TestRangeProperties { * a unicode document */ @Test - public void testUnicodeParagraphDefinitions() { + void testUnicodeParagraphDefinitions() { Range r = u.getRange(); String[] p1_parts = u_page_1.split("\r"); @@ -267,7 +267,7 @@ public final class TestRangeProperties { * Tests the paragraph text of a unicode document */ @Test - public void testUnicodeTextParagraphs() { + void testUnicodeTextParagraphs() { Range r = u.getRange(); assertEquals( u_page_1 + @@ -304,7 +304,7 @@ public final class TestRangeProperties { } @Test - public void testUnicodeStyling() { + void testUnicodeStyling() { Range r = u.getRange(); String[] p1_parts = u_page_1.split("\r"); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeReplacement.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeReplacement.java index c9de0ffe31..2cecbe8bd6 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeReplacement.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeReplacement.java @@ -47,7 +47,7 @@ public final class TestRangeReplacement { /** * Test just opening the files */ - public void testOpen() { + void testOpen() { openSampleFile(illustrativeDocFile); } @@ -55,7 +55,7 @@ public final class TestRangeReplacement { * Test (more "confirm" than test) that we have the general structure that we expect to have. */ @Test - public void testDocStructure() throws IOException { + void testDocStructure() throws IOException { try (HWPFDocument daDoc = openSampleFile(illustrativeDocFile)) { Range range = daDoc.getRange(); @@ -84,7 +84,7 @@ public final class TestRangeReplacement { * Test that we can replace text in our Range with Unicode text. */ @Test - public void testRangeReplacementOne() throws IOException { + void testRangeReplacementOne() throws IOException { try (HWPFDocument daDoc = openSampleFile(illustrativeDocFile)) { // Has one section @@ -124,7 +124,7 @@ public final class TestRangeReplacement { * Test that we can replace text in our Range with Unicode text. */ @Test - public void testRangeReplacementAll() throws IOException { + void testRangeReplacementAll() throws IOException { try (HWPFDocument daDoc = openSampleFile(illustrativeDocFile)) { Range range = daDoc.getRange(); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeSymbols.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeSymbols.java index c7e9485594..32898c2b8e 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeSymbols.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeSymbols.java @@ -31,7 +31,7 @@ import static org.junit.jupiter.api.Assertions.*; */ public final class TestRangeSymbols { @Test - public void test() throws IOException { + void test() throws IOException { HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug49908.doc"); Range range = doc.getRange(); @@ -50,7 +50,7 @@ public final class TestRangeSymbols { } @Test - public void test61586() throws IOException { + void test61586() throws IOException { HWPFDocument document = HWPFTestDataSamples.openSampleFile("61586.doc"); assertEquals("\r" + "\r" + diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestTableRow.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestTableRow.java index 268931a68e..84f1009afa 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestTableRow.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestTableRow.java @@ -29,7 +29,7 @@ public class TestTableRow { private static final POIDataSamples SAMPLES = POIDataSamples.getDocumentInstance(); @Test - public void testInnerTableCellsDetection() throws IOException { + void testInnerTableCellsDetection() throws IOException { InputStream is = SAMPLES.openResourceAsStream( "innertable.doc" ); HWPFDocument hwpfDocument = new HWPFDocument( is ); is.close(); @@ -47,7 +47,7 @@ public class TestTableRow { } @Test - public void testOuterTableCellsDetection() throws IOException { + void testOuterTableCellsDetection() throws IOException { InputStream is = SAMPLES.openResourceAsStream( "innertable.doc" ); HWPFDocument hwpfDocument = new HWPFDocument( is ); is.close(); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/util/TestLittleEndianCP950Reader.java b/src/scratchpad/testcases/org/apache/poi/hwpf/util/TestLittleEndianCP950Reader.java index 310b714516..5ff823779c 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/util/TestLittleEndianCP950Reader.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/util/TestLittleEndianCP950Reader.java @@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test; public class TestLittleEndianCP950Reader { @Test - public void testPersonalUseMappings() throws Exception { + void testPersonalUseMappings() throws Exception { //ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit950.txt byte[] data = new byte[2]; data[1] = (byte) 0xfe;