Author: lehmi Date: Wed Nov 18 07:22:56 2020 New Revision: 1883587 URL: http://svn.apache.org/viewvc?rev=1883587&view=rev Log: PDFBOX-5017: sonar fix
Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/it/gsub/GsubWorkerForBengaliTest.java pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/MergeAcroFormsTest.java pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/MergeAnnotationsTest.java pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/OverlayTest.java pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFCloneUtilityTest.java pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PageExtractorTest.java Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/it/gsub/GsubWorkerForBengaliTest.java URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/it/gsub/GsubWorkerForBengaliTest.java?rev=1883587&r1=1883586&r2=1883587&view=diff ============================================================================== --- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/it/gsub/GsubWorkerForBengaliTest.java (original) +++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/it/gsub/GsubWorkerForBengaliTest.java Wed Nov 18 07:22:56 2020 @@ -42,7 +42,7 @@ import org.junit.jupiter.api.Test; * @author Palash Ray * */ -public class GsubWorkerForBengaliTest +class GsubWorkerForBengaliTest { private static final String LOHIT_BENGALI_TTF = "/org/apache/pdfbox/ttf/Lohit-Bengali.ttf"; @@ -64,7 +64,7 @@ public class GsubWorkerForBengaliTest } @Test - public void testApplyTransforms_simple_hosshoi_kar() + void testApplyTransforms_simple_hosshoi_kar() { // given List<Integer> glyphsAfterGsub = Arrays.asList(56, 102, 91); @@ -77,7 +77,7 @@ public class GsubWorkerForBengaliTest } @Test - public void testApplyTransforms_ja_phala() + void testApplyTransforms_ja_phala() { // given List<Integer> glyphsAfterGsub = Arrays.asList(89, 156, 101, 97); @@ -90,7 +90,7 @@ public class GsubWorkerForBengaliTest } @Test - public void testApplyTransforms_e_kar() + void testApplyTransforms_e_kar() { // given List<Integer> glyphsAfterGsub = Arrays.asList(438, 89, 94, 101); @@ -103,7 +103,7 @@ public class GsubWorkerForBengaliTest } @Test - public void testApplyTransforms_o_kar() + void testApplyTransforms_o_kar() { // given List<Integer> glyphsAfterGsub = Arrays.asList(108, 89, 101, 97); @@ -116,7 +116,7 @@ public class GsubWorkerForBengaliTest } @Disabled - public void testApplyTransforms_o_kar_repeated_1_not_working_yet() + void testApplyTransforms_o_kar_repeated_1_not_working_yet() { // given List<Integer> glyphsAfterGsub = Arrays.asList(108, 96, 101, 108, 94, 101); @@ -129,7 +129,7 @@ public class GsubWorkerForBengaliTest } @Disabled - public void testApplyTransforms_o_kar_repeated_2_not_working_yet() + void testApplyTransforms_o_kar_repeated_2_not_working_yet() { // given List<Integer> glyphsAfterGsub = Arrays.asList(108, 73, 101, 108, 77, 101); @@ -142,7 +142,7 @@ public class GsubWorkerForBengaliTest } @Test - public void testApplyTransforms_ou_kar() + void testApplyTransforms_ou_kar() { // given List<Integer> glyphsAfterGsub = Arrays.asList(108, 91, 114, 94); @@ -155,7 +155,7 @@ public class GsubWorkerForBengaliTest } @Test - public void testApplyTransforms_oi_kar() + void testApplyTransforms_oi_kar() { // given List<Integer> glyphsAfterGsub = Arrays.asList(439, 89, 93); @@ -168,7 +168,7 @@ public class GsubWorkerForBengaliTest } @Test - public void testApplyTransforms_kha_e_murddhana_swa_e_khiwa() + void testApplyTransforms_kha_e_murddhana_swa_e_khiwa() { // given List<Integer> glyphsAfterGsub = Arrays.asList(167, 103, 438, 93, 93); @@ -181,7 +181,7 @@ public class GsubWorkerForBengaliTest } @Test - public void testApplyTransforms_ra_phala() + void testApplyTransforms_ra_phala() { // given List<Integer> glyphsAfterGsub = Arrays.asList(274, 82); @@ -194,7 +194,7 @@ public class GsubWorkerForBengaliTest } @Test - public void testApplyTransforms_ref() + void testApplyTransforms_ref() { // given List<Integer> glyphsAfterGsub = Arrays.asList(85, 104, 440, 82); @@ -207,7 +207,7 @@ public class GsubWorkerForBengaliTest } @Test - public void testApplyTransforms_ra_e_hosshu() + void testApplyTransforms_ra_e_hosshu() { // given List<Integer> glyphsAfterGsub = Arrays.asList(352, 108, 87, 101); @@ -220,7 +220,7 @@ public class GsubWorkerForBengaliTest } @Test - public void testApplyTransforms_la_e_la_e() + void testApplyTransforms_la_e_la_e() { // given List<Integer> glyphsAfterGsub = Arrays.asList(67, 108, 369, 101, 94); @@ -233,7 +233,7 @@ public class GsubWorkerForBengaliTest } @Test - public void testApplyTransforms_khanda_ta() + void testApplyTransforms_khanda_ta() { // given List<Integer> glyphsAfterGsub = Arrays.asList(98, 78, 101, 113); Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/MergeAcroFormsTest.java URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/MergeAcroFormsTest.java?rev=1883587&r1=1883586&r2=1883587&view=diff ============================================================================== --- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/MergeAcroFormsTest.java (original) +++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/MergeAcroFormsTest.java Wed Nov 18 07:22:56 2020 @@ -42,7 +42,7 @@ import org.junit.jupiter.api.Test; * * */ -public class MergeAcroFormsTest +class MergeAcroFormsTest { private static final File IN_DIR = new File("src/test/resources/org/apache/pdfbox/multipdf"); private static final File OUT_DIR = new File("target/test-output/merge/"); @@ -58,7 +58,7 @@ public class MergeAcroFormsTest * Test LegacyMode merge */ @Test - public void testLegacyModeMerge() throws IOException + void testLegacyModeMerge() throws IOException { PDFMergerUtility merger = new PDFMergerUtility(); File toBeMerged = new File(IN_DIR,"AcroFormForMerge.pdf"); @@ -132,7 +132,8 @@ public class MergeAcroFormsTest * PDFBOX-1031 Ensure that after merging the PDFs there is an Annots entry per page. */ @Test - public void testAnnotsEntry() throws IOException { + void testAnnotsEntry() throws IOException + { // Merge the PDFs form PDFBOX-1031 PDFMergerUtility merger = new PDFMergerUtility(); @@ -171,7 +172,8 @@ public class MergeAcroFormsTest * PDFBOX-1100 Ensure that after merging the PDFs there is an AP and V entry. */ @Test - public void testAPEntry() throws IOException { + void testAPEntry() throws IOException + { File file1 = new File(TARGET_PDF_DIR, "PDFBOX-1100-1.pdf"); File file2 = new File(TARGET_PDF_DIR, "PDFBOX-1100-2.pdf"); @@ -210,6 +212,4 @@ public class MergeAcroFormsTest } } - - } Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/MergeAnnotationsTest.java URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/MergeAnnotationsTest.java?rev=1883587&r1=1883586&r2=1883587&view=diff ============================================================================== --- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/MergeAnnotationsTest.java (original) +++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/MergeAnnotationsTest.java Wed Nov 18 07:22:56 2020 @@ -38,7 +38,7 @@ import org.junit.jupiter.api.Test; /** * Test merging different PDFs with Annotations. */ -public class MergeAnnotationsTest +class MergeAnnotationsTest { private static final File OUT_DIR = new File("target/test-output/merge/"); private static final File TARGET_PDF_DIR = new File("target/pdfs"); @@ -54,7 +54,8 @@ public class MergeAnnotationsTest * annotations and they point to the correct page. */ @Test - public void testLinkAnnotations() throws IOException { + void testLinkAnnotations() throws IOException + { // Merge the PDFs from PDFBOX-1065 PDFMergerUtility merger = new PDFMergerUtility(); Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/OverlayTest.java URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/OverlayTest.java?rev=1883587&r1=1883586&r2=1883587&view=diff ============================================================================== --- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/OverlayTest.java (original) +++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/OverlayTest.java Wed Nov 18 07:22:56 2020 @@ -40,7 +40,7 @@ import org.junit.jupiter.api.Test; * * @author Tilman Hausherr */ -public class OverlayTest +class OverlayTest { private static final File IN_DIR = new File("src/test/resources/org/apache/pdfbox/multipdf"); private static final File OUT_DIR = new File("target/test-output/overlay"); @@ -55,13 +55,8 @@ public class OverlayTest OUT_DIR.mkdirs(); } - @AfterEach - public void tearDown() - { - } - @Test - public void testRotatedOverlays() throws Exception + void testRotatedOverlays() throws Exception { testRotatedOverlay(0); testRotatedOverlay(90); Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFCloneUtilityTest.java URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFCloneUtilityTest.java?rev=1883587&r1=1883586&r2=1883587&view=diff ============================================================================== --- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFCloneUtilityTest.java (original) +++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFCloneUtilityTest.java Wed Nov 18 07:22:56 2020 @@ -40,7 +40,7 @@ import org.junit.jupiter.api.Test; * @author Cornelis Hoeflake * @author Tilman Hausherr */ -public class PDFCloneUtilityTest +class PDFCloneUtilityTest { /** * original (minimal) test from PDFBOX-2052. @@ -48,7 +48,7 @@ public class PDFCloneUtilityTest * @throws IOException */ @Test - public void testClonePDFWithCosArrayStream() throws IOException + void testClonePDFWithCosArrayStream() throws IOException { try (PDDocument srcDoc = new PDDocument(); PDDocument dstDoc = new PDDocument()) @@ -68,7 +68,7 @@ public class PDFCloneUtilityTest * @throws IOException */ @Test - public void testClonePDFWithCosArrayStream2() throws IOException + void testClonePDFWithCosArrayStream2() throws IOException { final String TESTDIR = "target/test-output/clone/"; final String CLONESRC = "clone-src.pdf"; @@ -121,7 +121,7 @@ public class PDFCloneUtilityTest * @throws IOException */ @Test - public void testDirectIndirect() throws IOException + void testDirectIndirect() throws IOException { try (PDDocument doc1 = new PDDocument()) { Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java?rev=1883587&r1=1883586&r2=1883587&view=diff ============================================================================== --- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java (original) +++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java Wed Nov 18 07:22:56 2020 @@ -67,7 +67,7 @@ import org.junit.jupiter.api.Test; * @author Maruan Sahyoun (PDF files) * @author Tilman Hausherr (code) */ -public class PDFMergerUtilityTest +class PDFMergerUtilityTest { final String SRCDIR = "src/test/resources/input/merge/"; final String TARGETTESTDIR = "target/test-output/merge/"; @@ -93,7 +93,7 @@ public class PDFMergerUtilityTest * @throws IOException if something goes wrong. */ @Test - public void testPDFMergerUtility() throws IOException + void testPDFMergerUtility() throws IOException { checkMergeIdentical("PDFBox.GlobalResourceMergeTest.Doc01.decoded.pdf", "PDFBox.GlobalResourceMergeTest.Doc02.decoded.pdf", @@ -115,7 +115,7 @@ public class PDFMergerUtilityTest * @throws IOException if something goes wrong. */ @Test - public void testJpegCcitt() throws IOException + void testJpegCcitt() throws IOException { checkMergeIdentical("jpegrgb.pdf", "multitiff.pdf", @@ -131,7 +131,7 @@ public class PDFMergerUtilityTest // see PDFBOX-2893 @Test - public void testPDFMergerUtility2() throws IOException + void testPDFMergerUtility2() throws IOException { checkMergeIdentical("PDFBox.GlobalResourceMergeTest.Doc01.pdf", "PDFBox.GlobalResourceMergeTest.Doc02.pdf", @@ -151,7 +151,7 @@ public class PDFMergerUtilityTest * @throws IOException */ @Test - public void testPDFMergerOpenAction() throws IOException + void testPDFMergerOpenAction() throws IOException { try (PDDocument doc1 = new PDDocument()) { @@ -195,7 +195,7 @@ public class PDFMergerUtilityTest * @throws IOException */ @Test - public void testStructureTreeMerge() throws IOException + void testStructureTreeMerge() throws IOException { PDFMergerUtility pdfMergerUtility = new PDFMergerUtility(); PDDocument src = Loader @@ -235,7 +235,7 @@ public class PDFMergerUtilityTest * @throws IOException */ @Test - public void testStructureTreeMerge2() throws IOException + void testStructureTreeMerge2() throws IOException { PDFMergerUtility pdfMergerUtility = new PDFMergerUtility(); PDDocument doc = Loader @@ -284,7 +284,7 @@ public class PDFMergerUtilityTest * @throws IOException */ @Test - public void testStructureTreeMerge3() throws IOException + void testStructureTreeMerge3() throws IOException { PDFMergerUtility pdfMergerUtility = new PDFMergerUtility(); PDDocument src = Loader.loadPDF(new File(TARGETPDFDIR, "PDFBOX-4408.pdf")); @@ -323,7 +323,7 @@ public class PDFMergerUtilityTest * @throws IOException */ @Test - public void testStructureTreeMerge4() throws IOException + void testStructureTreeMerge4() throws IOException { PDFMergerUtility pdfMergerUtility = new PDFMergerUtility(); PDDocument src = Loader.loadPDF(new File(SRCDIR, "PDFBOX-4417-001031.pdf")); @@ -361,7 +361,7 @@ public class PDFMergerUtilityTest * @throws IOException */ @Test - public void testStructureTreeMerge5() throws IOException + void testStructureTreeMerge5() throws IOException { PDFMergerUtility pdfMergerUtility = new PDFMergerUtility(); PDDocument src = Loader.loadPDF(new File(SRCDIR, "PDFBOX-4417-054080.pdf")); @@ -397,7 +397,7 @@ public class PDFMergerUtilityTest * @throws IOException */ @Test - public void testStructureTreeMerge6() throws IOException + void testStructureTreeMerge6() throws IOException { PDFMergerUtility pdfMergerUtility = new PDFMergerUtility(); PDDocument src = Loader.loadPDF(new File(TARGETPDFDIR, "PDFBOX-4418-000671.pdf")); @@ -448,7 +448,7 @@ public class PDFMergerUtilityTest * @throws IOException */ @Test - public void testStructureTreeMerge7() throws IOException + void testStructureTreeMerge7() throws IOException { PDFMergerUtility pdfMergerUtility = new PDFMergerUtility(); PDDocument src = Loader.loadPDF(new File(TARGETPDFDIR, "PDFBOX-4423-000746.pdf")); @@ -488,7 +488,7 @@ public class PDFMergerUtilityTest * PDFBOX-4009: Test that ParentTreeNextKey is recalculated correctly. */ @Test - public void testMissingParentTreeNextKey() throws IOException + void testMissingParentTreeNextKey() throws IOException { PDFMergerUtility pdfMergerUtility = new PDFMergerUtility(); PDDocument src = Loader.loadPDF(new File(TARGETPDFDIR, "PDFBOX-4418-000314.pdf")); @@ -516,7 +516,7 @@ public class PDFMergerUtilityTest * @throws IOException */ @Test - public void testStructureTreeMergeIDTree() throws IOException + void testStructureTreeMergeIDTree() throws IOException { PDFMergerUtility pdfMergerUtility = new PDFMergerUtility(); PDDocument src = Loader.loadPDF(new File(SRCDIR, "PDFBOX-4417-001031.pdf")); @@ -560,7 +560,7 @@ public class PDFMergerUtilityTest * @throws IOException */ @Test - public void testMergeBogusStructParents1() throws IOException + void testMergeBogusStructParents1() throws IOException { PDFMergerUtility pdfMergerUtility = new PDFMergerUtility(); PDDocument src = Loader.loadPDF(new File(TARGETPDFDIR, "PDFBOX-4408.pdf")); @@ -582,7 +582,7 @@ public class PDFMergerUtilityTest * @throws IOException */ @Test - public void testMergeBogusStructParents2() throws IOException + void testMergeBogusStructParents2() throws IOException { PDFMergerUtility pdfMergerUtility = new PDFMergerUtility(); PDDocument src = Loader.loadPDF(new File(TARGETPDFDIR, "PDFBOX-4408.pdf")); @@ -604,7 +604,7 @@ public class PDFMergerUtilityTest * @throws IOException */ @Test - public void testParentTree() throws IOException + void testParentTree() throws IOException { PDDocument doc = Loader .loadPDF(new File(TARGETPDFDIR, "PDFBOX-3999-GeneralForbearance.pdf")); @@ -691,7 +691,7 @@ public class PDFMergerUtilityTest * @throws IOException */ @Test - public void testFileDeletion() throws IOException + void testFileDeletion() throws IOException { File outFile = new File(TARGETTESTDIR, "PDFBOX-4383-result.pdf"); Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PageExtractorTest.java URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PageExtractorTest.java?rev=1883587&r1=1883586&r2=1883587&view=diff ============================================================================== Binary files - no diff available.