aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java6
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hdgf/dev/TestVSDDumper.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hemf/usermodel/TestHemfPicture.java6
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hmef/TestBugs.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestTNEFAttributes.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hmef/dev/TestHMEFDumper.java6
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/TestPOIDocumentScratchpad.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java6
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/TestReWriteSanity.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/TestRecordCounts.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestCruddyExtractor.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestExtractor.java27
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/model/TestHeadersFooters.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/model/TestShapes.java22
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideChangeNotes.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/model/TestTextRunReWrite.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/record/TestCurrentUserAtom.java6
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryption.java8
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryptionAtom.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordContainer.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBackground.java6
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java80
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestFontRendering.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestHSLFSlideShow.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestMostRecentRecords.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java6
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestReOrderingSlides.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRecordSetup.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSheetText.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSlideOrdering.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTable.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextRun.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextShape.java12
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hsmf/Test7BitCodepage.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunk.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwmf/TestRasterOp.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/HWPFDocFixture.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestCase.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/dev/TestHWPFLister.java6
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestDifferentRoutes.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/model/TestDocumentProperties.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFileInformationBlock.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFontTable.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSectionTable.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/model/TestStyleSheet.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/model/TestTextPieceTable.java4
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHeaderStories.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeProperties.java2
68 files changed, 183 insertions, 166 deletions
diff --git a/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java b/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java
index 8c5f3e9b88..ff82c40afb 100644
--- a/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java
+++ b/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java
@@ -37,11 +37,11 @@ public final class TestHDGFCore {
private VisioTextExtractor textExtractor;
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
fs = new POIFSFileSystem(_dgTests.openResourceAsStream("Test_Visio-Some_Random_Text.vsd"));
}
@AfterEach
- public void tearDown() throws Exception {
+ void tearDown() throws Exception {
if (textExtractor != null) textExtractor.close();
if (hdgf != null) hdgf.close();
}
@@ -98,7 +98,7 @@ public final class TestHDGFCore {
* chunk commands.
*/
@Test
- public void DISABLEDtestAIOOB() throws Exception {
+ void DISABLEDtestAIOOB() throws Exception {
fs = new POIFSFileSystem(_dgTests.openResourceAsStream("44501.vsd"));
hdgf = new HDGFDiagram(fs);
diff --git a/src/scratchpad/testcases/org/apache/poi/hdgf/dev/TestVSDDumper.java b/src/scratchpad/testcases/org/apache/poi/hdgf/dev/TestVSDDumper.java
index 183342cebc..10f131b7c4 100644
--- a/src/scratchpad/testcases/org/apache/poi/hdgf/dev/TestVSDDumper.java
+++ b/src/scratchpad/testcases/org/apache/poi/hdgf/dev/TestVSDDumper.java
@@ -44,7 +44,7 @@ public class TestVSDDumper {
}
@Test
- public void main() throws Exception {
+ void main() throws Exception {
File file = POIDataSamples.getDiagramInstance().getFile("Test_Visio-Some_Random_Text.vsd");
VSDDumper.main(new String[] { file.getAbsolutePath() });
}
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 ea4e8b3c34..5748d2575d 100644
--- a/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java
+++ b/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java
@@ -40,7 +40,7 @@ public final class TestStreamBugs extends StreamTest {
private POIFSFileSystem filesystem;
@BeforeEach
- public void setUp() throws IOException {
+ void setUp() throws IOException {
ptrFactory = new PointerFactory(11);
chunkFactory = new ChunkFactory(11);
@@ -61,7 +61,7 @@ public final class TestStreamBugs extends StreamTest {
}
@SuppressWarnings("unused")
- public void TOIMPLEMENTtestGetCertainChunks() {
+ void TOIMPLEMENTtestGetCertainChunks() {
int offsetA = 3708;
int offsetB = 3744;
}
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 798fffd6ad..e65121ffaf 100644
--- a/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java
+++ b/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java
@@ -44,7 +44,7 @@ public final class TestStreamComplex extends StreamTest {
private PointerFactory ptrFactory;
@BeforeEach
- public void setUp() throws IOException {
+ void setUp() throws IOException {
ptrFactory = new PointerFactory(11);
chunkFactory = new ChunkFactory(11);
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 2ce88b751b..6d39586729 100644
--- a/src/scratchpad/testcases/org/apache/poi/hemf/usermodel/TestHemfPicture.java
+++ b/src/scratchpad/testcases/org/apache/poi/hemf/usermodel/TestHemfPicture.java
@@ -61,7 +61,7 @@ public class TestHemfPicture {
/*
@Test
@Disabled("Only for manual tests")
- public void paintSingle() throws Exception {
+ void paintSingle() throws Exception {
File fileIn = new File("tmp/emfs/govdocs1/844/844795.ppt_2.emf");
String[] args = {
@@ -83,7 +83,7 @@ public class TestHemfPicture {
/*
@Test
@Disabled("Only for manual tests - need to add org.tukaani:xz:1.8 for this to work")
- public void paintMultiple() throws Exception {
+ void paintMultiple() throws Exception {
Pattern fileExt = Pattern.compile("(?i)^(.+/)*(.+)\\.(emf|wmf)$");
final byte[] buf = new byte[50_000_000];
try (SevenZFile sevenZFile = new SevenZFile(new File("tmp/plus_emf.7z"))
@@ -295,7 +295,7 @@ public class TestHemfPicture {
}
@Test
- public void nestedWmfEmf() throws Exception {
+ void nestedWmfEmf() throws Exception {
try (InputStream is = sl_samples.openResourceAsStream("nested_wmf.emf")) {
HemfPicture emf1 = new HemfPicture(is);
List<HwmfEmbedded> embeds = new ArrayList<>();
diff --git a/src/scratchpad/testcases/org/apache/poi/hmef/TestBugs.java b/src/scratchpad/testcases/org/apache/poi/hmef/TestBugs.java
index ef138aea90..704c85ef97 100644
--- a/src/scratchpad/testcases/org/apache/poi/hmef/TestBugs.java
+++ b/src/scratchpad/testcases/org/apache/poi/hmef/TestBugs.java
@@ -69,7 +69,7 @@ public class TestBugs {
}
@Test
- public void bug63955() throws IOException {
+ void bug63955() throws IOException {
HMEFMessage tnefDat = openSample("bug63955-winmail.dat");
List<MAPIAttribute> atts = tnefDat.getMessageMAPIAttributes();
assertEquals(96, atts.size());
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 276085bf3a..2ece5a0a3a 100644
--- a/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java
+++ b/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java
@@ -39,7 +39,7 @@ public final class TestMAPIAttributes {
private HMEFMessage quick;
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
try (InputStream stream = _samples.openResourceAsStream("quick-winmail.dat")) {
quick = new HMEFMessage(stream);
}
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 b688eb2f7e..c103bbc9e0 100644
--- a/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestTNEFAttributes.java
+++ b/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestTNEFAttributes.java
@@ -41,7 +41,7 @@ public final class TestTNEFAttributes {
private HMEFMessage quick;
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
try (InputStream is = _samples.openResourceAsStream("quick-winmail.dat")) {
quick = new HMEFMessage(is);
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hmef/dev/TestHMEFDumper.java b/src/scratchpad/testcases/org/apache/poi/hmef/dev/TestHMEFDumper.java
index fdf85a7b13..d56b7bdc4f 100644
--- a/src/scratchpad/testcases/org/apache/poi/hmef/dev/TestHMEFDumper.java
+++ b/src/scratchpad/testcases/org/apache/poi/hmef/dev/TestHMEFDumper.java
@@ -32,18 +32,18 @@ import org.junit.jupiter.api.Test;
public class TestHMEFDumper {
@Test
- public void noArguments() {
+ void noArguments() {
assertThrows(IllegalArgumentException.class, TestHMEFDumper::doMain);
}
@Test
- public void main() throws Exception {
+ void main() throws Exception {
File file = POIDataSamples.getHMEFInstance().getFile("quick-winmail.dat");
doMain(file.getAbsolutePath());
}
@Test
- public void mainFull() throws Exception {
+ void mainFull() throws Exception {
File file = POIDataSamples.getHMEFInstance().getFile("quick-winmail.dat");
doMain("--full", file.getAbsolutePath());
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/TestPOIDocumentScratchpad.java b/src/scratchpad/testcases/org/apache/poi/hslf/TestPOIDocumentScratchpad.java
index 9ee032275f..774b1fb91b 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/TestPOIDocumentScratchpad.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/TestPOIDocumentScratchpad.java
@@ -56,7 +56,7 @@ public final class TestPOIDocumentScratchpad {
* a Word Document for our testing
*/
@BeforeEach
- public void setUp() throws IOException {
+ void setUp() throws IOException {
doc = new HSLFSlideShowImpl(POIDataSamples.getSlideShowInstance().openResourceAsStream("basic_test_ppt_file.ppt"));
doc2 = HWPFTestDataSamples.openSampleFile("test2.doc");
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java b/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java
index fc99dc955d..d7cc878fa4 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java
@@ -53,7 +53,7 @@ public final class TestReWrite {
private POIFSFileSystem pfsC;
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
@@ -73,7 +73,7 @@ public final class TestReWrite {
assertWritesOutTheSame(hssB, pfsB);
}
- public void assertWritesOutTheSame(HSLFSlideShowImpl hss, POIFSFileSystem pfs) throws Exception {
+ void assertWritesOutTheSame(HSLFSlideShowImpl hss, POIFSFileSystem pfs) throws Exception {
// Write out to a byte array, and to a temp file
ByteArrayOutputStream baos = new ByteArrayOutputStream();
hss.write(baos);
@@ -156,7 +156,7 @@ public final class TestReWrite {
//assertSlideShowWritesOutTheSame(hssB, pfsB);
}
- public void assertSlideShowWritesOutTheSame(HSLFSlideShowImpl hss, POIFSFileSystem pfs) throws IOException {
+ void assertSlideShowWritesOutTheSame(HSLFSlideShowImpl hss, POIFSFileSystem pfs) throws IOException {
// Create a slideshow covering it
@SuppressWarnings("resource")
HSLFSlideShow ss = new HSLFSlideShow(hss);
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/TestReWriteSanity.java b/src/scratchpad/testcases/org/apache/poi/hslf/TestReWriteSanity.java
index 152f0b9a92..200966fd7a 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/TestReWriteSanity.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/TestReWriteSanity.java
@@ -50,14 +50,14 @@ public final class TestReWriteSanity {
private POIFSFileSystem pfs;
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
pfs = new POIFSFileSystem(slTests.openResourceAsStream("basic_test_ppt_file.ppt"));
ss = new HSLFSlideShowImpl(pfs);
}
@AfterEach
- public void tearDown() throws Exception {
+ void tearDown() throws Exception {
pfs.close();
ss.close();
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/TestRecordCounts.java b/src/scratchpad/testcases/org/apache/poi/hslf/TestRecordCounts.java
index 312ca490dd..5c8463ca3e 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/TestRecordCounts.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/TestRecordCounts.java
@@ -40,7 +40,7 @@ public final class TestRecordCounts {
private HSLFSlideShowImpl ss;
@BeforeEach
- public void setup() throws Exception {
+ void setup() throws Exception {
ss = new HSLFSlideShowImpl(slTests.openResourceAsStream("basic_test_ppt_file.ppt"));
}
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 8828eb4dd9..24ea8ac966 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java
@@ -75,7 +75,7 @@ public abstract class BasePPTIteratingTest {
private final PrintStream save = System.out;
@BeforeEach
- public void setUpBase() throws UnsupportedEncodingException {
+ void setUpBase() throws UnsupportedEncodingException {
// set a higher max allocation limit as some test-files require more
IOUtils.setByteArrayMaxOverride(5*1024*1024);
@@ -84,7 +84,7 @@ public abstract class BasePPTIteratingTest {
}
@AfterEach
- public void tearDownBase() {
+ void tearDownBase() {
System.setOut(save);
// reset
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 41128d7841..71e1258d1e 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestCruddyExtractor.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestCruddyExtractor.java
@@ -63,7 +63,7 @@ public final class TestCruddyExtractor {
};
@BeforeEach
- public void setup() throws Exception {
+ void setup() throws Exception {
te = new QuickButCruddyTextExtractor(slTests.openResourceAsStream("basic_test_ppt_file.ppt"));
}
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 74ff702ece..6b385b8e20 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestExtractor.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestExtractor.java
@@ -31,8 +31,8 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.BitSet;
import java.util.List;
-import java.util.stream.Collectors;
+import com.zaxxer.sparsebits.SparseBitSet;
import org.apache.poi.POIDataSamples;
import org.apache.poi.hslf.usermodel.HSLFObjectShape;
import org.apache.poi.hslf.usermodel.HSLFSlideShow;
@@ -470,16 +470,33 @@ public final class TestExtractor {
}
@Test
- public void glyphCounting() throws IOException {
+ void glyphCounting() throws IOException {
String[] expected = {
"Times New Roman", "\t\n ,-./01234679:ABDEFGILMNOPRSTVWabcdefghijklmnoprstuvwxyz\u00F3\u201C\u201D",
"Arial", " Lacdilnost"
};
+
+ StringBuilder sb = new StringBuilder();
+
try (SlideShowExtractor<?,?> ppt = openExtractor("45543.ppt")) {
for (int i=0; i<expected.length; i+=2) {
- BitSet l = ppt.getCodepoints(expected[i], null, null);
- String s = l.stream().mapToObj(Character::toChars).map(String::valueOf).collect(Collectors.joining());
- assertEquals(expected[i+1], s);
+ final String font = expected[i];
+ final String cps = expected[i+1];
+
+ sb.setLength(0);
+
+ BitSet l1 = ppt.getCodepoints(font, null, null);
+ l1.stream().mapToObj(Character::toChars).forEach(sb::append);
+ assertEquals(cps, sb.toString());
+
+ sb.setLength(0);
+
+ SparseBitSet l2 = ppt.getCodepointsInSparseBitSet(font, null, null);
+ int cp = 0;
+ while ((cp = l2.nextSetBit(cp+1)) != -1) {
+ sb.append(Character.toChars(cp));
+ }
+ assertEquals(cps, sb.toString());
}
}
}
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 60d2136741..dfcb4d339b 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHeadersFooters.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHeadersFooters.java
@@ -235,7 +235,7 @@ public final class TestHeadersFooters
ppt1.close();
}
@Test
- public void bug58144a() throws IOException {
+ void bug58144a() throws IOException {
try (InputStream is = _slTests.openResourceAsStream("bug58144-headers-footers-2003.ppt");
SlideShow<?,?> ppt = new HSLFSlideShow(is)) {
HSLFSlide sl = (HSLFSlide) ppt.getSlides().get(0);
@@ -249,7 +249,7 @@ public final class TestHeadersFooters
}
@Test
- public void bug58144b() throws IOException {
+ void bug58144b() throws IOException {
try (InputStream is = _slTests.openResourceAsStream("bug58144-headers-footers-2007.ppt");
SlideShow<?,?> ppt = new HSLFSlideShow(is)) {
Slide<?, ?> sl = ppt.getSlides().get(0);
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 bda71c08da..8d31b900bf 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java
@@ -95,7 +95,7 @@ public final class TestHyperlink {
}
@Test
- public void bug47291() throws IOException {
+ void bug47291() throws IOException {
HSLFSlideShow ppt1 = new HSLFSlideShow();
HSLFSlide slide1 = ppt1.createSlide();
HSLFTextRun r1 = slide1.createTextBox().setText("page1");
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 0cb7dad0a4..774fe06468 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestShapes.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestShapes.java
@@ -69,7 +69,7 @@ public final class TestShapes {
private HSLFSlideShow pptB;
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
try (InputStream is1 = _slTests.openResourceAsStream("empty.ppt");
InputStream is2 = _slTests.openResourceAsStream("empty_textbox.ppt")) {
ppt = new HSLFSlideShow(is1);
@@ -78,7 +78,7 @@ public final class TestShapes {
}
@Test
- public void graphics() throws IOException {
+ void graphics() throws IOException {
HSLFSlide slide = ppt.createSlide();
HSLFLine line = new HSLFLine();
@@ -124,7 +124,7 @@ public final class TestShapes {
* Verify that we can read TextBox shapes
*/
@Test
- public void textBoxRead() throws IOException {
+ void textBoxRead() throws IOException {
ppt = new HSLFSlideShow(_slTests.openResourceAsStream("with_textbox.ppt"));
HSLFSlide sl = ppt.getSlides().get(0);
for (HSLFShape sh : sl.getShapes()) {
@@ -211,7 +211,7 @@ public final class TestShapes {
* and set some of the style attributes
*/
@Test
- public void textBoxWriteBytes() throws IOException {
+ void textBoxWriteBytes() throws IOException {
ppt = new HSLFSlideShow();
HSLFSlide sl = ppt.createSlide();
HSLFTextRun rt;
@@ -269,7 +269,7 @@ public final class TestShapes {
* Test with an empty text box
*/
@Test
- public void emptyTextBox() {
+ void emptyTextBox() {
assertEquals(2, pptB.getSlides().size());
HSLFSlide s1 = pptB.getSlides().get(0);
HSLFSlide s2 = pptB.getSlides().get(1);
@@ -284,7 +284,7 @@ public final class TestShapes {
* it must be the same as returned by Slide.getTextRuns().
*/
@Test
- public void textBoxSet() throws IOException {
+ void textBoxSet() throws IOException {
textBoxSet("with_textbox.ppt");
textBoxSet("basic_test_ppt_file.ppt");
textBoxSet("next_test_ppt_file.ppt");
@@ -326,7 +326,7 @@ public final class TestShapes {
* Test adding shapes to <code>ShapeGroup</code>
*/
@Test
- public void shapeGroup() throws IOException {
+ void shapeGroup() throws IOException {
HSLFSlideShow ss = new HSLFSlideShow();
HSLFSlide slide = ss.createSlide();
@@ -381,7 +381,7 @@ public final class TestShapes {
* Test functionality of Sheet.removeShape(Shape shape)
*/
@Test
- public void removeShapes() throws IOException {
+ void removeShapes() throws IOException {
String file = "with_textbox.ppt";
HSLFSlideShow ss = new HSLFSlideShow(_slTests.openResourceAsStream(file));
HSLFSlide sl = ss.getSlides().get(0);
@@ -408,7 +408,7 @@ public final class TestShapes {
}
@Test
- public void lineWidth() {
+ void lineWidth() {
HSLFSimpleShape sh = new HSLFAutoShape(ShapeType.RT_TRIANGLE);
AbstractEscherOptRecord opt = sh.getEscherOptRecord();
@@ -423,7 +423,7 @@ public final class TestShapes {
}
@Test
- public void shapeId() throws IOException {
+ void shapeId() throws IOException {
HSLFSlideShow ss = new HSLFSlideShow();
HSLFSlide slide = ss.createSlide();
@@ -473,7 +473,7 @@ public final class TestShapes {
}
@Test
- public void lineColor() throws IOException {
+ void lineColor() throws IOException {
HSLFSlideShow ss = new HSLFSlideShow(_slTests.openResourceAsStream("51731.ppt"));
List<HSLFShape> shape = ss.getSlides().get(0).getShapes();
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 7e98adec07..7557a8bc17 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideChangeNotes.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideChangeNotes.java
@@ -36,7 +36,7 @@ public final class TestSlideChangeNotes {
private HSLFSlideShow ss;
@BeforeEach
- public void init() throws Exception {
+ void init() throws Exception {
POIDataSamples _slTests = POIDataSamples.getSlideShowInstance();
HSLFSlideShowImpl hss = new HSLFSlideShowImpl(_slTests.openResourceAsStream("basic_test_ppt_file.ppt"));
ss = new HSLFSlideShow(hss);
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 dd8209aa35..f6f7fe6f7c 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTextRunReWrite.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTextRunReWrite.java
@@ -48,7 +48,7 @@ public final class TestTextRunReWrite {
* Load up a test PPT file with rich data
*/
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
String filename = "Single_Coloured_Page_With_Fonts_and_Alignments.ppt";
ss = new HSLFSlideShow(slTests.openResourceAsStream(filename));
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestCurrentUserAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestCurrentUserAtom.java
index f6bf8f0bea..030b954d3c 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestCurrentUserAtom.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestCurrentUserAtom.java
@@ -44,7 +44,7 @@ public final class TestCurrentUserAtom {
private static final String encFile = "Password_Protected-hello.ppt";
@Test
- public void readNormal() throws Exception {
+ void readNormal() throws Exception {
POIFSFileSystem fs = new POIFSFileSystem(_slTests.getFile(normalFile));
CurrentUserAtom cu = new CurrentUserAtom(fs.getRoot());
@@ -66,7 +66,7 @@ public final class TestCurrentUserAtom {
}
@Test
- public void readEnc() throws Exception {
+ void readEnc() throws Exception {
try (POIFSFileSystem fs = new POIFSFileSystem(_slTests.getFile(encFile))) {
new CurrentUserAtom(fs.getRoot());
assertThrows(EncryptedPowerPointFileException.class, () -> new HSLFSlideShowImpl(fs).close());
@@ -74,7 +74,7 @@ public final class TestCurrentUserAtom {
}
@Test
- public void writeNormal() throws Exception {
+ void writeNormal() throws Exception {
// Get raw contents from a known file
byte[] contents;
try (POIFSFileSystem fs = new POIFSFileSystem(_slTests.getFile(normalFile))) {
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 860f7d5494..949a0c1ac4 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java
@@ -38,7 +38,7 @@ public final class TestDocument {
private POIFSFileSystem pfs;
@BeforeEach
- public void setup() throws Exception {
+ void setup() throws Exception {
pfs = new POIFSFileSystem(slTests.openResourceAsStream("basic_test_ppt_file.ppt"));
ss = new HSLFSlideShowImpl(pfs);
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryption.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryption.java
index 7cb1054209..55944a5246 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryption.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryption.java
@@ -62,7 +62,7 @@ public class TestDocumentEncryption {
"Password_Protected-hello.ppt",
"Password_Protected-np-hello.ppt"
})
- public void cryptoAPIDecryptionOther(String pptFile) throws Exception {
+ void cryptoAPIDecryptionOther(String pptFile) throws Exception {
Biff8EncryptionKey.setCurrentUserPassword("hello");
try {
try (POIFSFileSystem fs = new POIFSFileSystem(slTests.getFile(pptFile), true);
@@ -75,7 +75,7 @@ public class TestDocumentEncryption {
}
@Test
- public void cryptoAPIChangeKeySize() throws Exception {
+ void cryptoAPIChangeKeySize() throws Exception {
String pptFile = "cryptoapi-proc2356.ppt";
Biff8EncryptionKey.setCurrentUserPassword("crypto");
try (POIFSFileSystem fs = new POIFSFileSystem(slTests.getFile(pptFile), true);
@@ -106,7 +106,7 @@ public class TestDocumentEncryption {
}
@Test
- public void cryptoAPIEncryption() throws Exception {
+ void cryptoAPIEncryption() throws Exception {
/* documents with multiple edits need to be normalized for encryption */
String pptFile = "57272_corrupted_usereditatom.ppt";
ByteArrayOutputStream encrypted = new ByteArrayOutputStream();
@@ -140,7 +140,7 @@ public class TestDocumentEncryption {
}
@Test
- public void cryptoAPIDecryption() throws Exception {
+ void cryptoAPIDecryption() throws Exception {
// taken from a msdn blog:
// http://blogs.msdn.com/b/openspecification/archive/2009/05/08/dominic-salemno.aspx
Biff8EncryptionKey.setCurrentUserPassword("crypto");
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryptionAtom.java b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryptionAtom.java
index acdec41ef2..ac837fc582 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryptionAtom.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryptionAtom.java
@@ -89,7 +89,7 @@ public final class TestDocumentEncryptionAtom {
};
@Test
- public void recordType() throws IOException {
+ void recordType() throws IOException {
DocumentEncryptionAtom dea1 = new DocumentEncryptionAtom(data_a, 0, data_a.length);
assertEquals(12052l, dea1.getRecordType());
@@ -101,7 +101,7 @@ public final class TestDocumentEncryptionAtom {
}
@Test
- public void encryptionTypeName() throws IOException {
+ void encryptionTypeName() throws IOException {
DocumentEncryptionAtom dea1 = new DocumentEncryptionAtom(data_a, 0, data_a.length);
assertEquals("Microsoft Base Cryptographic Provider v1.0", dea1.getEncryptionProviderName());
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 039f5b98e7..f5b64da586 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java
@@ -94,7 +94,7 @@ public final class TestFontCollection {
}
@Test
- public void bug61881() throws IOException {
+ void bug61881() throws IOException {
try (InputStream is = _slTests.openResourceAsStream("bug61881.ppt")) {
try (HSLFSlideShow ppt = new HSLFSlideShow(is)) {
assertEquals("?imes New Roman",ppt.getFont(3).getTypeface());
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 a713ac083d..dccb8f2cad 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordContainer.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordContainer.java
@@ -40,7 +40,7 @@ public final class TestRecordContainer {
private static final POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
@BeforeEach
- public void setUp() throws IOException {
+ void setUp() throws IOException {
// Find a real RecordContainer record
InputStream is = slTests.openResourceAsStream("basic_test_ppt_file.ppt");
hss = new HSLFSlideShowImpl(is);
@@ -56,7 +56,7 @@ public final class TestRecordContainer {
}
@AfterEach
- public void closeResources() throws IOException {
+ void closeResources() throws IOException {
hss.close();
}
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 66db974066..93f37305a9 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java
@@ -42,7 +42,7 @@ public final class TestTxMasterStyleAtom {
private HSLFSlideShow _ppt;
@BeforeEach
- public void setUp() {
+ void setUp() {
_ppt = new HSLFSlideShow();
}
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 c786196769..35e5880406 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java
@@ -53,14 +53,14 @@ public final class TestAddingSlides {
* Create/open the slideshows
*/
@BeforeEach
- public void setUp() throws IOException {
+ void setUp() throws IOException {
ss_empty = new HSLFSlideShow();
ss_one = HSLFTestDataSamples.getSlideShow("Single_Coloured_Page.ppt");
ss_two = HSLFTestDataSamples.getSlideShow("basic_test_ppt_file.ppt");
}
@AfterEach
- public void tearDown() throws IOException {
+ void tearDown() throws IOException {
ss_two.close();
ss_one.close();
ss_empty.close();
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBackground.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBackground.java
index 97cf3216d4..c105e08518 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBackground.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBackground.java
@@ -50,7 +50,7 @@ public final class TestBackground {
* Default background for slide, shape and slide master.
*/
@Test
- public void defaults() throws IOException {
+ void defaults() throws IOException {
HSLFSlideShow ppt = new HSLFSlideShow();
assertEquals(HSLFFill.FILL_SOLID, ppt.getSlideMasters().get(0).getBackground().getFill().getFillType());
@@ -68,7 +68,7 @@ public final class TestBackground {
* Read fill information from an reference ppt file
*/
@Test
- public void readBackground() throws IOException {
+ void readBackground() throws IOException {
HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("backgrounds.ppt");
HSLFFill fill;
HSLFShape shape;
@@ -101,7 +101,7 @@ public final class TestBackground {
* Create a ppt with various fill effects
*/
@Test
- public void backgroundPicture() throws IOException {
+ void backgroundPicture() throws IOException {
HSLFSlideShow ppt1 = new HSLFSlideShow();
HSLFSlide slide;
HSLFFill fill;
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
index 3694059c36..140501344a 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
@@ -97,7 +97,7 @@ public final class TestBugs {
* Bug 41384: Array index wrong in record creation
*/
@Test
- public void bug41384() throws IOException {
+ void bug41384() throws IOException {
try (HSLFSlideShow ppt = open("41384.ppt")) {
assertEquals(1, ppt.getSlides().size());
@@ -113,7 +113,7 @@ public final class TestBugs {
* when the RichTextRun comes from a Notes model object
*/
@Test
- public void bug42474_1() throws IOException {
+ void bug42474_1() throws IOException {
try (HSLFSlideShow ppt = open("42474-1.ppt")) {
assertEquals(2, ppt.getSlides().size());
@@ -139,7 +139,7 @@ public final class TestBugs {
* Second fix from Bug 42474: Incorrect matching of notes to slides
*/
@Test
- public void bug42474_2() throws IOException {
+ void bug42474_2() throws IOException {
try (HSLFSlideShow ppt = open("42474-2.ppt")) {
//map slide number and starting phrase of its notes
@@ -168,7 +168,7 @@ public final class TestBugs {
* Bug 42485: All TextBoxes inside ShapeGroups have null TextRuns
*/
@Test
- public void bug42485 () throws IOException {
+ void bug42485 () throws IOException {
try (HSLFSlideShow ppt = open("42485.ppt")) {
for (HSLFShape shape : ppt.getSlides().get(0).getShapes()) {
if (shape instanceof HSLFGroupShape) {
@@ -188,7 +188,7 @@ public final class TestBugs {
* Bug 42484: NullPointerException from ShapeGroup.getAnchor()
*/
@Test
- public void bug42484 () throws IOException {
+ void bug42484 () throws IOException {
try (HSLFSlideShow ppt = open("42485.ppt")) {
for (HSLFShape shape : ppt.getSlides().get(0).getShapes()) {
if (shape instanceof HSLFGroupShape) {
@@ -206,7 +206,7 @@ public final class TestBugs {
* Bug 41381: Exception from Slide.getMasterSheet() on a seemingly valid PPT file
*/
@Test
- public void bug41381() throws IOException {
+ void bug41381() throws IOException {
try (HSLFSlideShow ppt = open("alterman_security.ppt")) {
assertEquals(1, ppt.getSlideMasters().size());
assertEquals(1, ppt.getTitleMasters().size());
@@ -225,7 +225,7 @@ public final class TestBugs {
*/
@SuppressWarnings("unused")
@Test
- public void bug42486 () throws IOException {
+ void bug42486 () throws IOException {
try (HSLFSlideShow ppt = open("42486.ppt")) {
for (HSLFSlide slide : ppt.getSlides()) {
List<HSLFShape> shape = slide.getShapes();
@@ -237,7 +237,7 @@ public final class TestBugs {
* Bug 42524: NPE in Shape.getShapeType()
*/
@Test
- public void bug42524 () throws IOException {
+ void bug42524 () throws IOException {
try (HSLFSlideShow ppt = open("42486.ppt")) {
//walk down the tree and see if there were no errors while reading
for (HSLFSlide slide : ppt.getSlides()) {
@@ -259,7 +259,7 @@ public final class TestBugs {
*/
@SuppressWarnings("unused")
@Test
- public void bug42520 () throws IOException {
+ void bug42520 () throws IOException {
try (HSLFSlideShow ppt = open("42520.ppt")) {
//test case from the bug report
@@ -288,7 +288,7 @@ public final class TestBugs {
* ( also fixed followup: getTextRuns() returns no text )
*/
@Test
- public void bug38256 () throws IOException {
+ void bug38256 () throws IOException {
try (HSLFSlideShow ppt = open("38256.ppt")) {
List<HSLFSlide> slide = ppt.getSlides();
assertEquals(1, slide.size());
@@ -313,7 +313,7 @@ public final class TestBugs {
* ( also fixed followup: getTextRuns() returns no text )
*/
@Test
- public void bug43781() throws IOException {
+ void bug43781() throws IOException {
try (HSLFSlideShow ppt = open("43781.ppt")) {
// Check the first slide
HSLFSlide slide = ppt.getSlides().get(0);
@@ -348,7 +348,7 @@ public final class TestBugs {
* Bug 44296: HSLF Not Extracting Slide Background Image
*/
@Test
- public void bug44296 () throws IOException {
+ void bug44296 () throws IOException {
try (HSLFSlideShow ppt = open("44296.ppt")) {
HSLFSlide slide = ppt.getSlides().get(0);
@@ -368,7 +368,7 @@ public final class TestBugs {
* type with id 1036 on class class org.apache.poi.hslf.record.PPDrawing
*/
@Test
- public void bug44770() throws IOException {
+ void bug44770() throws IOException {
try (HSLFSlideShow ppt = open("44770.ppt")) {
assertNotNull(ppt.getSlides().get(0));
}
@@ -378,7 +378,7 @@ public final class TestBugs {
* Bug 41071: Will not extract text from Powerpoint TextBoxes
*/
@Test
- public void bug41071() throws IOException {
+ void bug41071() throws IOException {
try (HSLFSlideShow ppt = open("41071.ppt")) {
HSLFSlide slide = ppt.getSlides().get(0);
List<HSLFShape> sh = slide.getShapes();
@@ -397,7 +397,7 @@ public final class TestBugs {
* PowerPoint 95 files should throw a more helpful exception
*/
@Test
- public void bug41711() throws IOException {
+ void bug41711() throws IOException {
// New file is fine
open("SampleShow.ppt").close();
@@ -409,7 +409,7 @@ public final class TestBugs {
* Changing text from Ascii to Unicode
*/
@Test
- public void bug49648() throws IOException {
+ void bug49648() throws IOException {
try (HSLFSlideShow ppt = open("49648.ppt")) {
for (HSLFSlide slide : ppt.getSlides()) {
for (List<HSLFTextParagraph> run : slide.getTextParagraphs()) {
@@ -425,7 +425,7 @@ public final class TestBugs {
* Bug 41246: AIOOB with illegal note references
*/
@Test
- public void bug41246a() throws IOException {
+ void bug41246a() throws IOException {
try (HSLFSlideShow ppt = open("41246-1.ppt")) {
try (HSLFSlideShow ppt2 = writeOutAndReadBack(ppt)) {
assertNotNull(ppt2.getSlides().get(0));
@@ -434,7 +434,7 @@ public final class TestBugs {
}
@Test
- public void bug41246b() throws IOException {
+ void bug41246b() throws IOException {
try (HSLFSlideShow ppt = open("41246-2.ppt")) {
try (HSLFSlideShow ppt2 = writeOutAndReadBack(ppt)) {
assertNotNull(ppt2.getSlides().get(0));
@@ -446,7 +446,7 @@ public final class TestBugs {
* Bug 45776: Fix corrupt file problem using TextRun.setText
*/
@Test
- public void bug45776() throws IOException {
+ void bug45776() throws IOException {
DateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.ROOT);
try (HSLFSlideShow ppt = open("45776.ppt")) {
@@ -476,7 +476,7 @@ public final class TestBugs {
}
@Test
- public void bug55732() throws IOException {
+ void bug55732() throws IOException {
try (HSLFSlideShow ppt = open("bug55732.ppt")) {
/* Iterate over slides and extract text */
for (HSLFSlide slide : ppt.getSlides()) {
@@ -487,7 +487,7 @@ public final class TestBugs {
}
@Test
- public void bug56260() throws IOException {
+ void bug56260() throws IOException {
try (HSLFSlideShow ppt = open("56260.ppt")) {
List<HSLFSlide> _slides = ppt.getSlides();
assertEquals(13, _slides.size());
@@ -524,7 +524,7 @@ public final class TestBugs {
}
@Test
- public void bug37625() throws IOException {
+ void bug37625() throws IOException {
try (HSLFSlideShow ppt1 = open("37625.ppt");
HSLFSlideShow ppt2 = writeOutAndReadBack(ppt1)) {
assertEquals(29, ppt1.getSlides().size());
@@ -534,7 +534,7 @@ public final class TestBugs {
}
@Test
- public void bug57272() throws IOException {
+ void bug57272() throws IOException {
try (HSLFSlideShow ppt1 = open("57272_corrupted_usereditatom.ppt");
HSLFSlideShow ppt2 = writeOutAndReadBack(ppt1)) {
assertEquals(6, ppt1.getSlides().size());
@@ -544,7 +544,7 @@ public final class TestBugs {
}
@Test
- public void bug49541() throws IOException {
+ void bug49541() throws IOException {
try (HSLFSlideShow ppt = open("49541_symbol_map.ppt")) {
HSLFSlide slide = ppt.getSlides().get(0);
HSLFGroupShape sg = (HSLFGroupShape) slide.getShapes().get(0);
@@ -555,7 +555,7 @@ public final class TestBugs {
}
@Test
- public void bug47261() throws IOException {
+ void bug47261() throws IOException {
try (HSLFSlideShow ppt = open("bug47261.ppt")) {
ppt.removeSlide(0);
ppt.createSlide();
@@ -564,7 +564,7 @@ public final class TestBugs {
}
@Test
- public void bug56240() throws IOException {
+ void bug56240() throws IOException {
try (HSLFSlideShow ppt = open("bug56240.ppt")) {
int slideCnt = ppt.getSlides().size();
assertEquals(105, slideCnt);
@@ -573,7 +573,7 @@ public final class TestBugs {
}
@Test
- public void bug46441() throws IOException {
+ void bug46441() throws IOException {
try (HSLFSlideShow ppt = open("bug46441.ppt")) {
HSLFAutoShape as = (HSLFAutoShape) ppt.getSlides().get(0).getShapes().get(0);
AbstractEscherOptRecord opt = as.getEscherOptRecord();
@@ -601,12 +601,12 @@ public final class TestBugs {
}
@Test
- public void bug58516() throws IOException {
+ void bug58516() throws IOException {
open("bug58516.ppt").close();
}
@Test
- public void bug45124() throws IOException {
+ void bug45124() throws IOException {
try (HSLFSlideShow ppt = open("bug45124.ppt")) {
Slide<?, ?> slide1 = ppt.getSlides().get(1);
@@ -638,7 +638,7 @@ public final class TestBugs {
}
@Test
- public void bug45088() throws IOException {
+ void bug45088() throws IOException {
String template = "[SYSDATE]";
String textExp = "REPLACED_DATE_WITH_A_LONG_ONE";
@@ -667,7 +667,7 @@ public final class TestBugs {
}
@Test
- public void bug45908() throws IOException {
+ void bug45908() throws IOException {
try (HSLFSlideShow ppt1 = open("bug45908.ppt")) {
HSLFSlide slide = ppt1.getSlides().get(0);
@@ -740,7 +740,7 @@ public final class TestBugs {
}
@Test
- public void bug47904() throws IOException {
+ void bug47904() throws IOException {
try (HSLFSlideShow ppt1 = new HSLFSlideShow()) {
HSLFSlideMaster sm = ppt1.getSlideMasters().get(0);
HSLFAutoShape as = (HSLFAutoShape) sm.getPlaceholder(Placeholder.TITLE);
@@ -772,7 +772,7 @@ public final class TestBugs {
}
@Test
- public void bug58718() throws IOException {
+ void bug58718() throws IOException {
String[] files = {"bug58718_008524.ppt", "bug58718_008558.ppt", "bug58718_349008.ppt", "bug58718_008495.ppt",};
for (String f : files) {
File sample = HSLFTestDataSamples.getSampleFile(f);
@@ -783,7 +783,7 @@ public final class TestBugs {
}
@Test
- public void bug58733() throws IOException {
+ void bug58733() throws IOException {
File sample = HSLFTestDataSamples.getSampleFile("bug58733_671884.ppt");
try (SlideShowExtractor<?,?> ex = new SlideShowExtractor<>(SlideShowFactory.create(sample))) {
assertNotNull(ex.getText());
@@ -791,7 +791,7 @@ public final class TestBugs {
}
@Test
- public void bug58159() throws IOException {
+ void bug58159() throws IOException {
try (HSLFSlideShow ppt = open("bug58159_headers-and-footers.ppt")) {
HeadersFooters hf = ppt.getSlideHeadersFooters();
assertNull(hf.getHeaderText());
@@ -816,7 +816,7 @@ public final class TestBugs {
}
@Test
- public void bug55030() throws IOException {
+ void bug55030() throws IOException {
try (HSLFSlideShow ppt = open("bug55030.ppt")) {
String expFamily = "\u96b6\u4e66";
@@ -833,7 +833,7 @@ public final class TestBugs {
}
@Test
- public void bug59056() throws IOException {
+ void bug59056() throws IOException {
try (HSLFSlideShow ppt = open("54541_cropped_bitmap.ppt")) {
for (HSLFShape shape : ppt.getSlides().get(0).getShapes()) {
BufferedImage img = new BufferedImage(500, 300, BufferedImage.TYPE_INT_ARGB);
@@ -857,7 +857,7 @@ public final class TestBugs {
}
@Test
- public void bug55983() throws IOException {
+ void bug55983() throws IOException {
try (HSLFSlideShow ppt1 = new HSLFSlideShow()) {
HSLFSlide sl = ppt1.createSlide();
assertNotNull(sl.getBackground());
@@ -894,7 +894,7 @@ public final class TestBugs {
}
@Test
- public void bug59302() throws IOException {
+ void bug59302() throws IOException {
//add extraction from PPT
Map<String, String> macros = getMacrosFromHSLF("59302.ppt");
assertNotNull(macros, "couldn't find macros");
@@ -939,7 +939,7 @@ public final class TestBugs {
* Bug 60294: Add "unknown" ShapeType for 4095
*/
@Test
- public void bug60294() throws IOException {
+ void bug60294() throws IOException {
try (HSLFSlideShow ppt = open("60294.ppt")) {
List<HSLFShape> shList = ppt.getSlides().get(0).getShapes();
assertEquals(ShapeType.NOT_PRIMITIVE, shList.get(2).getShapeType());
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestFontRendering.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestFontRendering.java
index ca4ee45071..b3d6785aec 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestFontRendering.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestFontRendering.java
@@ -53,7 +53,7 @@ public class TestFontRendering {
// @Disabled2("This fails on some systems because fonts are rendered slightly different")
@Test
- public void bug55902mixedFontWithChineseCharacters() throws IOException, FontFormatException {
+ void bug55902mixedFontWithChineseCharacters() throws IOException, FontFormatException {
// font files need to be downloaded first via
// ant test-scratchpad-download-resources
String[][] fontFiles = {
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestHSLFSlideShow.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestHSLFSlideShow.java
index ca2953ac81..e1f453327d 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestHSLFSlideShow.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestHSLFSlideShow.java
@@ -34,7 +34,7 @@ public class TestHSLFSlideShow extends BaseTestSlideShow<HSLFShape, HSLFTextPara
// make sure junit4 executes this test class
@Test
- public void dummy() {
+ void dummy() {
assertNotNull(createSlideShow());
}
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 fabe1733ab..d96201b89f 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestMostRecentRecords.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestMostRecentRecords.java
@@ -34,7 +34,7 @@ public final class TestMostRecentRecords {
private HSLFSlideShow ss;
@BeforeEach
- public void setup() throws Exception {
+ void setup() throws Exception {
POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
hss = new HSLFSlideShowImpl(slTests.openResourceAsStream("basic_test_ppt_file.ppt"));
ss = new HSLFSlideShow(hss);
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 93791bebb2..69863e5685 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java
@@ -32,7 +32,7 @@ public final class TestNotesText {
private HSLFSlideShow ss;
@BeforeEach
- public void setup() throws Exception {
+ void setup() throws Exception {
POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
HSLFSlideShowImpl hss = new HSLFSlideShowImpl(slTests.openResourceAsStream("basic_test_ppt_file.ppt"));
ss = new HSLFSlideShow(hss);
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java
index fd303f3215..e514f78835 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java
@@ -56,7 +56,7 @@ public final class TestPicture {
*
*/
@Test
- public void multiplePictures() throws IOException {
+ void multiplePictures() throws IOException {
try (HSLFSlideShow ppt = new HSLFSlideShow()) {
HSLFSlide s = ppt.createSlide();
HSLFSlide s2 = ppt.createSlide();
@@ -91,7 +91,7 @@ public final class TestPicture {
* was not found. The correct behaviour is to return null.
*/
@Test
- public void bug46122() throws IOException {
+ void bug46122() throws IOException {
try (HSLFSlideShow ppt = new HSLFSlideShow()) {
HSLFSlide slide = ppt.createSlide();
HSLFPictureData pd = HSLFPictureData.create(PictureType.PNG);
@@ -109,7 +109,7 @@ public final class TestPicture {
}
@Test
- public void macImages() throws IOException {
+ void macImages() throws IOException {
try (InputStream is = _slTests.openResourceAsStream("53446.ppt");
HSLFSlideShowImpl hss = new HSLFSlideShowImpl(is)) {
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 065234594b..0b9255050b 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestReOrderingSlides.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestReOrderingSlides.java
@@ -47,7 +47,7 @@ public final class TestReOrderingSlides {
* Create/open the slideshows
*/
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
hss_one = new HSLFSlideShowImpl(slTests.openResourceAsStream("Single_Coloured_Page.ppt"));
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 dc8f80f085..0eba4ae56e 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRecordSetup.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRecordSetup.java
@@ -38,7 +38,7 @@ public final class TestRecordSetup {
private HSLFSlideShowImpl hss;
@BeforeEach
- public void init() throws Exception {
+ void init() throws Exception {
POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
hss = new HSLFSlideShowImpl(slTests.openResourceAsStream("basic_test_ppt_file.ppt"));
ss = new HSLFSlideShow(hss);
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 9a303e239f..8081528a9f 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java
@@ -54,7 +54,7 @@ public final class TestRichTextRun {
private static String filenameC;
@BeforeEach
- public void setUp() throws IOException {
+ void setUp() throws IOException {
// Basic (non rich) test file
ss = HSLFTestDataSamples.getSlideShow("basic_test_ppt_file.ppt");
@@ -74,7 +74,7 @@ public final class TestRichTextRun {
}
@AfterEach
- public void tearDown() throws IOException {
+ void tearDown() throws IOException {
ss.close();
ssRichA.close();
ssRichB.close();
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 2fc953992c..a2c0469bc1 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSheetText.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSheetText.java
@@ -35,12 +35,12 @@ public final class TestSheetText {
private HSLFSlideShow ss;
@BeforeEach
- public void init() throws IOException {
+ void init() throws IOException {
ss = HSLFTestDataSamples.getSlideShow("basic_test_ppt_file.ppt");
}
@AfterEach
- public void tearDown() throws IOException {
+ void tearDown() throws IOException {
ss.close();
}
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 1d7725604d..0a5df4dde3 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSlideOrdering.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSlideOrdering.java
@@ -37,13 +37,13 @@ public final class TestSlideOrdering {
private HSLFSlideShow ssB;
@BeforeEach
- public void init() throws IOException {
+ void init() throws IOException {
ssA = HSLFTestDataSamples.getSlideShow("basic_test_ppt_file.ppt");
ssB = HSLFTestDataSamples.getSlideShow("incorrect_slide_order.ppt");
}
@AfterEach
- public void tearDown() throws IOException {
+ void tearDown() throws IOException {
ssA.close();
ssB.close();
}
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 0e5757051e..1176003e7a 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTable.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTable.java
@@ -42,7 +42,7 @@ import org.junit.jupiter.api.Test;
*/
public class TestTable {
@Test
- public void moveTable() throws IOException {
+ void moveTable() throws IOException {
HSLFSlideShow ppt = new HSLFSlideShow();
HSLFSlide slide = ppt.createSlide();
int rows = 3, cols = 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 0f3b79f3a8..cd1bdec759 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextRun.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextRun.java
@@ -48,7 +48,7 @@ public final class TestTextRun {
private HSLFSlideShow ssRich;
@BeforeEach
- public void setUp() throws IOException {
+ void setUp() throws IOException {
// Basic (non rich) test file
ss = HSLFTestDataSamples.getSlideShow("basic_test_ppt_file.ppt");
@@ -57,7 +57,7 @@ public final class TestTextRun {
}
@AfterEach
- public void tearDown() throws IOException {
+ void tearDown() throws IOException {
ssRich.close();
ss.close();
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextShape.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextShape.java
index 669c19abf2..1b577eb273 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextShape.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextShape.java
@@ -41,7 +41,7 @@ import org.junit.jupiter.api.Test;
*/
public final class TestTextShape {
@Test
- public void createAutoShape(){
+ void createAutoShape(){
HSLFTextShape shape = new HSLFAutoShape(ShapeType.TRAPEZOID);
assertNull(shape.getEscherTextboxWrapper());
assertNotNull(shape.getTextParagraphs());
@@ -51,7 +51,7 @@ public final class TestTextShape {
}
@Test
- public void createTextBox(){
+ void createTextBox(){
HSLFTextShape shape = new HSLFTextBox();
List<HSLFTextParagraph> paras = shape.getTextParagraphs();
assertNotNull(paras);
@@ -71,7 +71,7 @@ public final class TestTextShape {
* - text in auto-shapes
*/
@Test
- public void read() throws IOException {
+ void read() throws IOException {
HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("text_shapes.ppt");
List<String> lst1 = new ArrayList<>();
@@ -122,7 +122,7 @@ public final class TestTextShape {
}
@Test
- public void readWrite() throws IOException {
+ void readWrite() throws IOException {
HSLFSlideShow ppt = new HSLFSlideShow();
HSLFSlide slide = ppt.createSlide();
@@ -158,7 +158,7 @@ public final class TestTextShape {
}
@Test
- public void margins() throws IOException {
+ void margins() throws IOException {
HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("text-margins.ppt");
HSLFSlide slide = ppt.getSlides().get(0);
@@ -201,7 +201,7 @@ public final class TestTextShape {
}
@Test
- public void bug52599() throws IOException {
+ void bug52599() throws IOException {
HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("52599.ppt");
HSLFSlide slide = ppt.getSlides().get(0);
diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/Test7BitCodepage.java b/src/scratchpad/testcases/org/apache/poi/hsmf/Test7BitCodepage.java
index 3d3a067bb1..deecb942ab 100644
--- a/src/scratchpad/testcases/org/apache/poi/hsmf/Test7BitCodepage.java
+++ b/src/scratchpad/testcases/org/apache/poi/hsmf/Test7BitCodepage.java
@@ -41,7 +41,7 @@ public final class Test7BitCodepage {
* Initialize this test, load up the messages.
*/
@BeforeEach
- public void setup() throws IOException {
+ void setup() throws IOException {
POIDataSamples samples = POIDataSamples.getHSMFInstance();
ascii_cp1251_lcid1049 = new MAPIMessage(samples.openResourceAsStream("ASCII_CP1251_LCID1049.msg"));
ascii_utf_8_cp1252_lcid1031 = new MAPIMessage(samples.openResourceAsStream("ASCII_UTF-8_CP1252_LCID1031.msg"));
diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java
index c86932231b..a0a3d9fab7 100644
--- a/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java
+++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java
@@ -50,7 +50,7 @@ public final class TestBasics {
* Initialize this test, load up the blank.msg mapi message.
*/
@BeforeEach
- public void setup() throws IOException {
+ void setup() throws IOException {
POIDataSamples samples = POIDataSamples.getHSMFInstance();
simple = new MAPIMessage(samples.openResourceAsStream("simple_test_msg.msg"));
quick = new MAPIMessage(samples.openResourceAsStream("quick.msg"));
diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java
index d6d53fe14e..8b9e162bae 100644
--- a/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java
+++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java
@@ -38,7 +38,7 @@ public final class TestBlankFileRead {
* Initialize this test, load up the blank.msg mapi message.
*/
@BeforeEach
- public void setup() throws IOException {
+ void setup() throws IOException {
POIDataSamples samples = POIDataSamples.getHSMFInstance();
mapiMessage = new MAPIMessage(samples.openResourceAsStream("blank.msg"));
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunk.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunk.java
index 171a0816ff..7426a44482 100644
--- a/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunk.java
+++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunk.java
@@ -37,7 +37,7 @@ public final class TestMessageSubmissionChunk {
* Initialise this test, load up the test messages.
*/
@BeforeEach
- public void setup() throws IOException {
+ void setup() throws IOException {
POIDataSamples samples = POIDataSamples.getHSMFInstance();
this.mapiMessageExtraHyphenSubmissionChunk = new MAPIMessage(samples.openResourceAsStream("message_extra_hyphen_submission_chunk.msg"));
this.mapiMessageNormalSubmissionChunk = new MAPIMessage(samples.openResourceAsStream("message_normal_submission_chunk.msg"));
diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java
index c3c96022d2..eab6b64d6c 100644
--- a/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java
+++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java
@@ -37,7 +37,7 @@ public final class TestMessageSubmissionChunkY2KRead {
* Initialise this test, load up the three test messages.
*/
@BeforeEach
- public void setup() throws IOException {
+ void setup() throws IOException {
POIDataSamples samples = POIDataSamples.getHSMFInstance();
mapiMessage1979 = new MAPIMessage(samples.openResourceAsStream("message_1979.msg"));
mapiMessage1980 = new MAPIMessage(samples.openResourceAsStream("message_1980.msg"));
diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java
index 725e7d545a..c406b76057 100644
--- a/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java
+++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java
@@ -38,7 +38,7 @@ public final class TestOutlook30FileRead {
* Initialize this test, load up the blank.msg mapi message.
*/
@BeforeEach
- public void setup() throws IOException {
+ void setup() throws IOException {
POIDataSamples samples = POIDataSamples.getHSMFInstance();
this.mapiMessage = new MAPIMessage(samples.openResourceAsStream("outlook_30_msg.msg"));
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java b/src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java
index c71f7948e7..dff936b099 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java
@@ -56,7 +56,7 @@ public class TestHwmfParsing {
/* Bug 65063 */
"empty-polygon-close.wmf, 272"
})
- public void parse(String file, int recordCnt) throws IOException {
+ void parse(String file, int recordCnt) throws IOException {
try (InputStream fis = samples.openResourceAsStream(file)) {
HwmfPicture wmf = new HwmfPicture(fis);
List<HwmfRecord> records = wmf.getRecords();
diff --git a/src/scratchpad/testcases/org/apache/poi/hwmf/TestRasterOp.java b/src/scratchpad/testcases/org/apache/poi/hwmf/TestRasterOp.java
index e064c46485..840202da75 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwmf/TestRasterOp.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwmf/TestRasterOp.java
@@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test;
public class TestRasterOp {
@Test
- public void checkTertiaryCalcCmd() {
+ void checkTertiaryCalcCmd() {
for (HwmfTernaryRasterOp op : HwmfTernaryRasterOp.values()) {
String cmd = op.calcCmd();
if (HwmfTernaryRasterOp.SSPXDSXOXN == op) {
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFDocFixture.java b/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFDocFixture.java
index 763ec672c1..ea2a93cc12 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFDocFixture.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFDocFixture.java
@@ -28,7 +28,7 @@ import java.io.IOException;
public final class HWPFDocFixture
{
public static final String DEFAULT_TEST_FILE = "test.doc";
-
+
public byte[] _tableStream;
public byte[] _mainStream;
public FileInformationBlock _fib;
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestCase.java b/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestCase.java
index 594ee33646..937bb5367d 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestCase.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestCase.java
@@ -28,7 +28,7 @@ public abstract class HWPFTestCase {
protected HWPFDocFixture _hWPFDocFixture;
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
/** @todo verify the constructors */
_hWPFDocFixture = new HWPFDocFixture(this, getTestFile());
@@ -40,7 +40,7 @@ public abstract class HWPFTestCase {
}
@AfterEach
- public void tearDown() throws Exception {
+ void tearDown() throws Exception {
if (_hWPFDocFixture != null) {
_hWPFDocFixture.tearDown();
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java b/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java
index 2ccf5f9085..30d4e330f9 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java
@@ -50,7 +50,7 @@ public final class TestHWPFPictures {
private String imgDFile;
@BeforeEach
- public void setUp() {
+ void setUp() {
docAFile = "testPictures.doc";
docBFile = "two_images.doc";
docCFile = "vector_image.doc";
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java b/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java
index f074b3f5b1..d7d7ed6249 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java
@@ -95,7 +95,7 @@ public final class TestHWPFRangeParts {
private HWPFDocument docUnicode;
@BeforeEach
- public void setUp() {
+ void setUp() {
docUnicode = HWPFTestDataSamples.openSampleFile("HeaderFooterUnicode.doc");
docAscii = HWPFTestDataSamples.openSampleFile("ThreeColHeadFoot.doc");
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/dev/TestHWPFLister.java b/src/scratchpad/testcases/org/apache/poi/hwpf/dev/TestHWPFLister.java
index e320422c10..f0902f8216 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/dev/TestHWPFLister.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/dev/TestHWPFLister.java
@@ -41,20 +41,20 @@ public class TestHWPFLister {
}
@AfterEach
- public void tearDown() {
+ void tearDown() {
// the main-method sets these properties, we need to revert them here to not affect other tests
System.clearProperty("org.apache.poi.hwpf.preserveBinTables");
System.clearProperty("org.apache.poi.hwpf.preserveTextTable");
}
@Test
- public void main() throws Exception {
+ void main() throws Exception {
File file = POIDataSamples.getDocumentInstance().getFile("SampleDoc.doc");
HWPFLister.main(new String[] { file.getAbsolutePath() });
}
@Test
- public void mainAll() throws Exception {
+ void mainAll() throws Exception {
File file = POIDataSamples.getDocumentInstance().getFile("SampleDoc.doc");
HWPFLister.main(new String[] {
file.getAbsolutePath(),
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 6afaeb3572..1574c3410a 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestDifferentRoutes.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestDifferentRoutes.java
@@ -57,12 +57,12 @@ public final class TestDifferentRoutes {
private HWPFDocument doc;
@BeforeEach
- public void setUp() {
+ void setUp() {
doc = HWPFTestDataSamples.openSampleFile("test2.doc");
}
@AfterEach
- public void tearDown() throws IOException {
+ void tearDown() throws IOException {
doc.close();
}
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 3ad7ca5e81..ea68fde323 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java
@@ -74,14 +74,14 @@ public final class TestCHPBinTable {
}
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
_hWPFDocFixture = new HWPFDocFixture(this, HWPFDocFixture.DEFAULT_TEST_FILE);
_hWPFDocFixture.setUp();
}
@AfterEach
- public void tearDown() throws Exception {
+ void tearDown() throws Exception {
_cHPBinTable = null;
_hWPFDocFixture.tearDown();
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 4be4cf7d05..0a33bab46a 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestDocumentProperties.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestDocumentProperties.java
@@ -32,7 +32,7 @@ public final class TestDocumentProperties {
private HWPFDocFixture _hWPFDocFixture;
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
// TODO verify the constructors
_hWPFDocFixture = new HWPFDocFixture(this, HWPFDocFixture.DEFAULT_TEST_FILE);
_hWPFDocFixture.setUp();
@@ -40,7 +40,7 @@ public final class TestDocumentProperties {
}
@AfterEach
- public void tearDown() throws Exception {
+ void tearDown() {
_documentProperties = null;
_hWPFDocFixture.tearDown();
_hWPFDocFixture = null;
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 8450381045..b35a8d3c01 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFileInformationBlock.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFileInformationBlock.java
@@ -44,7 +44,7 @@ public final class TestFileInformationBlock {
}
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
/** @todo verify the constructors */
_hWPFDocFixture = new HWPFDocFixture(this, HWPFDocFixture.DEFAULT_TEST_FILE);
_hWPFDocFixture.setUp();
@@ -52,7 +52,7 @@ public final class TestFileInformationBlock {
}
@AfterEach
- public void tearDown() throws Exception {
+ void tearDown() throws Exception {
_fileInformationBlock = null;
_hWPFDocFixture.tearDown();
_hWPFDocFixture = null;
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 6e7c0f4cd7..dcda989a01 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFontTable.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFontTable.java
@@ -58,13 +58,13 @@ public final class TestFontTable {
}
@BeforeEach
- public void setUp() throws IOException {
+ void setUp() throws IOException {
_hWPFDocFixture = new HWPFDocFixture(this, HWPFDocFixture.DEFAULT_TEST_FILE);
_hWPFDocFixture.setUp();
}
@AfterEach
- public void tearDown() throws IOException {
+ void tearDown() throws IOException {
_hWPFDocFixture.tearDown();
}
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 809a283dcc..23a4c28777 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java
@@ -60,7 +60,7 @@ public final class TestPlexOfCps {
}
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
/**@todo verify the constructors*/
_hWPFDocFixture = new HWPFDocFixture(this, HWPFDocFixture.DEFAULT_TEST_FILE);
@@ -68,7 +68,7 @@ public final class TestPlexOfCps {
}
@AfterEach
- public void tearDown() throws Exception {
+ void tearDown() throws Exception {
_plexOfCps = null;
_hWPFDocFixture.tearDown();
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 a849ef4044..63ab183e75 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSectionTable.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSectionTable.java
@@ -86,7 +86,7 @@ public final class TestSectionTable {
}
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
/*@todo verify the constructors*/
_hWPFDocFixture = new HWPFDocFixture(this, HWPFDocFixture.DEFAULT_TEST_FILE);
@@ -94,7 +94,7 @@ public final class TestSectionTable {
}
@AfterEach
- public void tearDown() {
+ void tearDown() {
_hWPFDocFixture.tearDown();
_hWPFDocFixture = null;
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 eecec2b80e..dfffa2c4b8 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestStyleSheet.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestStyleSheet.java
@@ -65,7 +65,7 @@ public final class TestStyleSheet {
}
@BeforeEach
- public void setUp() throws IOException {
+ void setUp() throws IOException {
/**@todo verify the constructors*/
_hWPFDocFixture = new HWPFDocFixture(this, HWPFDocFixture.DEFAULT_TEST_FILE);
_hWPFDocFixture.setUp();
@@ -78,7 +78,7 @@ public final class TestStyleSheet {
}
@AfterEach
- public void tearDown() throws Exception {
+ void tearDown() throws Exception {
_styleSheet = null;
_hWPFDocFixture.tearDown();
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 ed4d858d25..9150631f67 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestTextPieceTable.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestTextPieceTable.java
@@ -38,7 +38,7 @@ public final class TestTextPieceTable {
private HWPFDocFixture _hWPFDocFixture;
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
System.setProperty("org.apache.poi.hwpf.preserveTextTable",
Boolean.TRUE.toString());
@@ -48,7 +48,7 @@ public final class TestTextPieceTable {
}
@AfterEach
- public void tearDown() throws Exception {
+ void tearDown() throws Exception {
_hWPFDocFixture.tearDown();
_hWPFDocFixture = null;
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 331cc4fdeb..72f0c86df0 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHeaderStories.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHeaderStories.java
@@ -41,7 +41,7 @@ public final class TestHeaderStories {
private HWPFDocument withFields;
@BeforeEach
- public void setUp() {
+ void setUp() {
none = openSampleFile("NoHeadFoot.doc");
header = openSampleFile("ThreeColHead.doc");
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 69a7853b55..21514bd246 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeProperties.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeProperties.java
@@ -69,7 +69,7 @@ public final class TestRangeProperties {
private HWPFDocument a;
@BeforeEach
- public void setUp() {
+ void setUp() {
u = HWPFTestDataSamples.openSampleFile("HeaderFooterUnicode.doc");
a = HWPFTestDataSamples.openSampleFile("SampleDoc.doc");
}