You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2021/01/09 19:20:10 UTC
svn commit: r1885315 [1/2] - in
/poi/trunk/src/scratchpad/testcases/org/apache/poi: hdgf/ hdgf/dev/
hdgf/streams/ hemf/usermodel/ hmef/ hmef/attribute/ hmef/dev/ hslf/
hslf/dev/ hslf/extractor/ hslf/model/ hslf/record/ hslf/usermodel/ hsmf/
hwmf/ hwpf/...
Author: kiwiwings
Date: Sat Jan 9 19:20:09 2021
New Revision: 1885315
URL: http://svn.apache.org/viewvc?rev=1885315&view=rev
Log:
Sonar fixes
JUnit5 test classes and methods should have default package visibility
Modified:
poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/dev/TestVSDDumper.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hemf/usermodel/TestHemfPicture.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/TestBugs.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestTNEFAttributes.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/dev/TestHMEFDumper.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestPOIDocumentScratchpad.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestReWriteSanity.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestRecordCounts.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestCruddyExtractor.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestExtractor.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHeadersFooters.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestShapes.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideChangeNotes.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTextRunReWrite.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestCurrentUserAtom.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryption.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryptionAtom.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordContainer.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBackground.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestFontRendering.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestHSLFSlideShow.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestMostRecentRecords.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestReOrderingSlides.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRecordSetup.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSheetText.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSlideOrdering.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTable.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextRun.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextShape.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/Test7BitCodepage.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunk.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwmf/TestRasterOp.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFDocFixture.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestCase.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/dev/TestHWPFLister.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestDifferentRoutes.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestDocumentProperties.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFileInformationBlock.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFontTable.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestSectionTable.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestStyleSheet.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestTextPieceTable.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHeaderStories.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeProperties.java
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java Sat Jan 9 19:20:09 2021
@@ -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);
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/dev/TestVSDDumper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/dev/TestVSDDumper.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/dev/TestVSDDumper.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/dev/TestVSDDumper.java Sat Jan 9 19:20:09 2021
@@ -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() });
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java Sat Jan 9 19:20:09 2021
@@ -40,7 +40,7 @@ public final class TestStreamBugs extend
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 extend
}
@SuppressWarnings("unused")
- public void TOIMPLEMENTtestGetCertainChunks() {
+ void TOIMPLEMENTtestGetCertainChunks() {
int offsetA = 3708;
int offsetB = 3744;
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java Sat Jan 9 19:20:09 2021
@@ -44,7 +44,7 @@ public final class TestStreamComplex ext
private PointerFactory ptrFactory;
@BeforeEach
- public void setUp() throws IOException {
+ void setUp() throws IOException {
ptrFactory = new PointerFactory(11);
chunkFactory = new ChunkFactory(11);
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hemf/usermodel/TestHemfPicture.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hemf/usermodel/TestHemfPicture.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hemf/usermodel/TestHemfPicture.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hemf/usermodel/TestHemfPicture.java Sat Jan 9 19:20:09 2021
@@ -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<>();
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/TestBugs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/TestBugs.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/TestBugs.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/TestBugs.java Sat Jan 9 19:20:09 2021
@@ -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());
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java Sat Jan 9 19:20:09 2021
@@ -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);
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestTNEFAttributes.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestTNEFAttributes.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestTNEFAttributes.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestTNEFAttributes.java Sat Jan 9 19:20:09 2021
@@ -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);
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/dev/TestHMEFDumper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/dev/TestHMEFDumper.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/dev/TestHMEFDumper.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hmef/dev/TestHMEFDumper.java Sat Jan 9 19:20:09 2021
@@ -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());
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestPOIDocumentScratchpad.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestPOIDocumentScratchpad.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestPOIDocumentScratchpad.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestPOIDocumentScratchpad.java Sat Jan 9 19:20:09 2021
@@ -56,7 +56,7 @@ public final class TestPOIDocumentScratc
* 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");
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java Sat Jan 9 19:20:09 2021
@@ -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);
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestReWriteSanity.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestReWriteSanity.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestReWriteSanity.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestReWriteSanity.java Sat Jan 9 19:20:09 2021
@@ -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();
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestRecordCounts.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestRecordCounts.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestRecordCounts.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestRecordCounts.java Sat Jan 9 19:20:09 2021
@@ -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"));
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java Sat Jan 9 19:20:09 2021
@@ -75,7 +75,7 @@ public abstract class BasePPTIteratingTe
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 BasePPTIteratingTe
}
@AfterEach
- public void tearDownBase() {
+ void tearDownBase() {
System.setOut(save);
// reset
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestCruddyExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestCruddyExtractor.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestCruddyExtractor.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestCruddyExtractor.java Sat Jan 9 19:20:09 2021
@@ -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"));
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestExtractor.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestExtractor.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestExtractor.java Sat Jan 9 19:20:09 2021
@@ -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());
}
}
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHeadersFooters.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHeadersFooters.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHeadersFooters.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHeadersFooters.java Sat Jan 9 19:20:09 2021
@@ -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);
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java Sat Jan 9 19:20:09 2021
@@ -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");
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestShapes.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestShapes.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestShapes.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestShapes.java Sat Jan 9 19:20:09 2021
@@ -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();
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideChangeNotes.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideChangeNotes.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideChangeNotes.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSlideChangeNotes.java Sat Jan 9 19:20:09 2021
@@ -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);
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTextRunReWrite.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTextRunReWrite.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTextRunReWrite.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTextRunReWrite.java Sat Jan 9 19:20:09 2021
@@ -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));
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestCurrentUserAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestCurrentUserAtom.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestCurrentUserAtom.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestCurrentUserAtom.java Sat Jan 9 19:20:09 2021
@@ -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))) {
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java Sat Jan 9 19:20:09 2021
@@ -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);
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryption.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryption.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryption.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryption.java Sat Jan 9 19:20:09 2021
@@ -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");
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryptionAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryptionAtom.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryptionAtom.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentEncryptionAtom.java Sat Jan 9 19:20:09 2021
@@ -89,7 +89,7 @@ public final class TestDocumentEncryptio
};
@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 TestDocumentEncryptio
}
@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());
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java Sat Jan 9 19:20:09 2021
@@ -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());
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordContainer.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordContainer.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordContainer.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordContainer.java Sat Jan 9 19:20:09 2021
@@ -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();
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java Sat Jan 9 19:20:09 2021
@@ -42,7 +42,7 @@ public final class TestTxMasterStyleAtom
private HSLFSlideShow _ppt;
@BeforeEach
- public void setUp() {
+ void setUp() {
_ppt = new HSLFSlideShow();
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestAddingSlides.java Sat Jan 9 19:20:09 2021
@@ -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();
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBackground.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBackground.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBackground.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBackground.java Sat Jan 9 19:20:09 2021
@@ -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;
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java Sat Jan 9 19:20:09 2021
@@ -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());
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestFontRendering.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestFontRendering.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestFontRendering.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestFontRendering.java Sat Jan 9 19:20:09 2021
@@ -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 = {
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestHSLFSlideShow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestHSLFSlideShow.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestHSLFSlideShow.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestHSLFSlideShow.java Sat Jan 9 19:20:09 2021
@@ -34,7 +34,7 @@ public class TestHSLFSlideShow extends B
// make sure junit4 executes this test class
@Test
- public void dummy() {
+ void dummy() {
assertNotNull(createSlideShow());
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestMostRecentRecords.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestMostRecentRecords.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestMostRecentRecords.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestMostRecentRecords.java Sat Jan 9 19:20:09 2021
@@ -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);
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java Sat Jan 9 19:20:09 2021
@@ -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);
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java Sat Jan 9 19:20:09 2021
@@ -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)) {
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestReOrderingSlides.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestReOrderingSlides.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestReOrderingSlides.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestReOrderingSlides.java Sat Jan 9 19:20:09 2021
@@ -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"));
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRecordSetup.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRecordSetup.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRecordSetup.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRecordSetup.java Sat Jan 9 19:20:09 2021
@@ -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);
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java Sat Jan 9 19:20:09 2021
@@ -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();
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSheetText.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSheetText.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSheetText.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSheetText.java Sat Jan 9 19:20:09 2021
@@ -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();
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSlideOrdering.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSlideOrdering.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSlideOrdering.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSlideOrdering.java Sat Jan 9 19:20:09 2021
@@ -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();
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTable.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTable.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTable.java Sat Jan 9 19:20:09 2021
@@ -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;
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextRun.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextRun.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextRun.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextRun.java Sat Jan 9 19:20:09 2021
@@ -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();
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextShape.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextShape.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextShape.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextShape.java Sat Jan 9 19:20:09 2021
@@ -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);
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/Test7BitCodepage.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/Test7BitCodepage.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/Test7BitCodepage.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/Test7BitCodepage.java Sat Jan 9 19:20:09 2021
@@ -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"));
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java Sat Jan 9 19:20:09 2021
@@ -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"));
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java Sat Jan 9 19:20:09 2021
@@ -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"));
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunk.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunk.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunk.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunk.java Sat Jan 9 19:20:09 2021
@@ -37,7 +37,7 @@ public final class TestMessageSubmission
* 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"));
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java Sat Jan 9 19:20:09 2021
@@ -37,7 +37,7 @@ public final class TestMessageSubmission
* 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"));
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java Sat Jan 9 19:20:09 2021
@@ -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"));
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java Sat Jan 9 19:20:09 2021
@@ -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();
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hwmf/TestRasterOp.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwmf/TestRasterOp.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hwmf/TestRasterOp.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hwmf/TestRasterOp.java Sat Jan 9 19:20:09 2021
@@ -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) {
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFDocFixture.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFDocFixture.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFDocFixture.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFDocFixture.java Sat Jan 9 19:20:09 2021
@@ -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;
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestCase.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestCase.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestCase.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestCase.java Sat Jan 9 19:20:09 2021
@@ -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();
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java Sat Jan 9 19:20:09 2021
@@ -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";
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java Sat Jan 9 19:20:09 2021
@@ -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");
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/dev/TestHWPFLister.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/dev/TestHWPFLister.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/dev/TestHWPFLister.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/dev/TestHWPFLister.java Sat Jan 9 19:20:09 2021
@@ -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(),
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestDifferentRoutes.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestDifferentRoutes.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestDifferentRoutes.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestDifferentRoutes.java Sat Jan 9 19:20:09 2021
@@ -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();
}
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java Sat Jan 9 19:20:09 2021
@@ -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();
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestDocumentProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestDocumentProperties.java?rev=1885315&r1=1885314&r2=1885315&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestDocumentProperties.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestDocumentProperties.java Sat Jan 9 19:20:09 2021
@@ -32,7 +32,7 @@ public final class TestDocumentPropertie
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 TestDocumentPropertie
}
@AfterEach
- public void tearDown() throws Exception {
+ void tearDown() {
_documentProperties = null;
_hWPFDocFixture.tearDown();
_hWPFDocFixture = null;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org