You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by le...@apache.org on 2020/11/18 07:15:42 UTC

svn commit: r1883585 - in /pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox: cos/ encryption/

Author: lehmi
Date: Wed Nov 18 07:15:41 2020
New Revision: 1883585

URL: http://svn.apache.org/viewvc?rev=1883585&view=rev
Log:
PDFBOX-5017: sonar fix

Modified:
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/COSDictionaryTest.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/COSObjectKeyTest.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/PDFDocEncodingTest.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSArray.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSBase.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSFloat.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSName.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSNumber.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSStream.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSString.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSUpdateInfo.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/UnmodifiableCOSDictionaryTest.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestPublicKeyEncryption.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/COSDictionaryTest.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/COSDictionaryTest.java?rev=1883585&r1=1883584&r2=1883585&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/COSDictionaryTest.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/COSDictionaryTest.java Wed Nov 18 07:15:41 2020
@@ -20,10 +20,10 @@ import static org.junit.jupiter.api.Asse
 
 import org.junit.jupiter.api.Test;
 
-public class COSDictionaryTest
+class COSDictionaryTest
 {
     @Test
-    public void testCOSDictionaryNotEqualsCOSStream()
+    void testCOSDictionaryNotEqualsCOSStream()
     {
         COSDictionary cosDictionary = new COSDictionary();
         COSStream cosStream = new COSStream();

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/COSObjectKeyTest.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/COSObjectKeyTest.java?rev=1883585&r1=1883584&r2=1883585&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/COSObjectKeyTest.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/COSObjectKeyTest.java Wed Nov 18 07:15:41 2020
@@ -21,10 +21,10 @@ import static org.junit.jupiter.api.Asse
 
 import org.junit.jupiter.api.Test;
 
-public class COSObjectKeyTest
+class COSObjectKeyTest
 {
     @Test
-    public void compareToInputNotNullOutputZero()
+    void compareToInputNotNullOutputZero()
     {
         // Arrange
         final COSObjectKey objectUnderTest = new COSObjectKey(0L, 0);
@@ -38,7 +38,7 @@ public class COSObjectKeyTest
     }
 
     @Test
-    public void compareToInputNotNullOutputPositive()
+    void compareToInputNotNullOutputPositive()
     {
         // Arrange
         final COSObjectKey objectUnderTest = new COSObjectKey(0L, 0);
@@ -52,7 +52,7 @@ public class COSObjectKeyTest
     }
 
     @Test
-    public void checkHashCode()
+    void checkHashCode()
     {
         // same object number 100 0
         assertEquals(new COSObjectKey(100, 0).hashCode(),

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/PDFDocEncodingTest.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/PDFDocEncodingTest.java?rev=1883585&r1=1883584&r2=1883585&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/PDFDocEncodingTest.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/PDFDocEncodingTest.java Wed Nov 18 07:15:41 2020
@@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test;
  * Test for PDFDocEncoding.
  *
  */
-public class PDFDocEncodingTest
+class PDFDocEncodingTest
 {
 
     static List<String> deviations = new ArrayList<>();
@@ -81,7 +81,7 @@ public class PDFDocEncodingTest
     }
     
     @Test
-    public void testDeviations()
+    void testDeviations()
     {
         for (String deviation: deviations)
         {
@@ -97,7 +97,7 @@ public class PDFDocEncodingTest
      * @throws IOException
      */
     @Test
-    public void testPDFBox3864() throws IOException
+    void testPDFBox3864() throws IOException
     {
         for (int i = 0; i < 256; i++)
         {

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSArray.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSArray.java?rev=1883585&r1=1883584&r2=1883585&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSArray.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSArray.java Wed Nov 18 07:15:41 2020
@@ -30,10 +30,10 @@ import org.junit.jupiter.api.Test;
 /**
  * Unittests for {@link COSArray}
  */
-public class TestCOSArray
+class TestCOSArray
 {
     @Test
-    public void testCreate()
+    void testCreate()
     {
         COSArray cosArray = new COSArray();
         assertEquals(0, cosArray.size());
@@ -54,7 +54,7 @@ public class TestCOSArray
     }
 
     @Test
-    public void testConvertString2COSNameAndBack()
+    void testConvertString2COSNameAndBack()
     {
         COSArray cosArray = COSArray.convertStringListToCOSNameCOSArray(
                 Arrays.asList(COSName.A.getName(), COSName.B.getName(), COSName.C.getName()));
@@ -71,7 +71,7 @@ public class TestCOSArray
     }
 
     @Test
-    public void testConvertString2COSStringAndBack()
+    void testConvertString2COSStringAndBack()
     {
         COSArray cosArray = COSArray
                 .convertStringListToCOSStringCOSArray(Arrays.asList("A", "B", "C"));
@@ -88,7 +88,7 @@ public class TestCOSArray
     }
 
     @Test
-    public void testConvertInteger2COSStringAndBack()
+    void testConvertInteger2COSStringAndBack()
     {
         COSArray cosArray = COSArray.convertIntegerListToCOSIntegerCOSArray(Arrays.asList(1, 2, 3));
         assertEquals(3, cosArray.size());
@@ -116,7 +116,7 @@ public class TestCOSArray
     }
 
     @Test
-    public void testConvertFloat2COSStringAndBack()
+    void testConvertFloat2COSStringAndBack()
     {
         float[] floatArrayStart = new float[] { 1.0f, 0.1f, 0.02f };
         COSArray cosArray = new COSArray();
@@ -159,7 +159,7 @@ public class TestCOSArray
     }
 
     @Test
-    public void testGetSetName()
+    void testGetSetName()
     {
         COSArray cosArray = new COSArray();
         cosArray.growToSize(3);
@@ -181,7 +181,7 @@ public class TestCOSArray
     }
 
     @Test
-    public void testGetSetInt()
+    void testGetSetInt()
     {
         COSArray cosArray = new COSArray();
         cosArray.growToSize(3);
@@ -203,7 +203,7 @@ public class TestCOSArray
     }
 
     @Test
-    public void testGetSetString()
+    void testGetSetString()
     {
         COSArray cosArray = new COSArray();
         cosArray.growToSize(3);
@@ -225,7 +225,7 @@ public class TestCOSArray
     }
 
     @Test
-    public void testRemove()
+    void testRemove()
     {
         COSArray cosArray = COSArray
                 .convertIntegerListToCOSIntegerCOSArray(Arrays.asList(1, 2, 3, 4, 5, 6));
@@ -263,7 +263,7 @@ public class TestCOSArray
     }
 
     @Test
-    public void testGrowToSize()
+    void testGrowToSize()
     {
         COSArray cosArray = new COSArray();
         assertEquals(0, cosArray.size());
@@ -284,7 +284,7 @@ public class TestCOSArray
     }
 
     @Test
-    public void testToList()
+    void testToList()
     {
         COSArray cosArray = COSArray
                 .convertIntegerListToCOSIntegerCOSArray(Arrays.asList(0, 1, 2, 3, 4, 5));

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSBase.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSBase.java?rev=1883585&r1=1883584&r2=1883585&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSBase.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSBase.java Wed Nov 18 07:15:41 2020
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test class for {@link COSBase}.
  */
-public abstract class TestCOSBase
+abstract class TestCOSBase
 {
     /** The COSBase abstraction of the object being tested. */
     protected static COSBase testCOSBase;
@@ -37,7 +37,7 @@ public abstract class TestCOSBase
      * Tests getCOSObject() - tests that the underlying object is returned.
      */
     @Test
-    public void testGetCOSObject()
+    void testGetCOSObject()
     {
         assertEquals(testCOSBase, testCOSBase.getCOSObject());
     }
@@ -45,13 +45,13 @@ public abstract class TestCOSBase
     /**
      * Test accept() - tests the interface for visiting a document at the COS level.
      */
-    public abstract void testAccept() throws IOException;
+    abstract void testAccept() throws IOException;
 
     /**
      * Tests isDirect() and setDirect() - tests the getter/setter methods.
      */
     @Test
-    public void testIsSetDirect()
+    void testIsSetDirect()
     {
         testCOSBase.setDirect(true);
         assertTrue(testCOSBase.isDirect());

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSFloat.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSFloat.java?rev=1883585&r1=1883584&r2=1883585&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSFloat.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSFloat.java Wed Nov 18 07:15:41 2020
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests {@link COSFloat}.
  */
-public class TestCOSFloat extends TestCOSNumber
+class TestCOSFloat extends TestCOSNumber
 {
     @BeforeAll
     static void setUp()
@@ -109,7 +109,7 @@ public class TestCOSFloat extends TestCO
      * Reflexivity, Symmetry, Transitivity and non-nullity.
      */
     @Test
-    public void testEquals()
+    void testEquals()
     {
         new BaseTester()
         {
@@ -159,7 +159,7 @@ public class TestCOSFloat extends TestCO
      * over a range of arbitrary values.
      */
     @Test
-    public void testHashCode()
+    void testHashCode()
     {
         new HashCodeTester().runTests();
     }
@@ -178,7 +178,7 @@ public class TestCOSFloat extends TestCO
 
     @Override
     @Test
-    public void testFloatValue()
+    void testFloatValue()
     {
         new FloatValueTester().runTests();
     }
@@ -197,7 +197,7 @@ public class TestCOSFloat extends TestCO
 
     @Override
     @Test
-    public void testIntValue()
+    void testIntValue()
     {
         new IntValueTester().runTests();
     }
@@ -216,7 +216,7 @@ public class TestCOSFloat extends TestCO
     
     @Override
     @Test
-    public void testLongValue()
+    void testLongValue()
     {
         new LongValueTester().runTests();
     }
@@ -247,7 +247,7 @@ public class TestCOSFloat extends TestCO
 
     @Override
     @Test
-    public void testAccept()
+    void testAccept()
     {
         new AcceptTester().runTests();
     }
@@ -294,7 +294,7 @@ public class TestCOSFloat extends TestCO
      * this object to it.
      */
     @Test
-    public void testWritePDF()
+    void testWritePDF()
     {
         WritePDFTester writePDFTester = new WritePDFTester();
         writePDFTester.runTests();
@@ -304,7 +304,7 @@ public class TestCOSFloat extends TestCO
     }
 
     @Test
-    public void testDoubleNegative() throws IOException
+    void testDoubleNegative() throws IOException
     {
         // PDFBOX-4289
         COSFloat cosFloat = new COSFloat("--16.33");
@@ -312,7 +312,7 @@ public class TestCOSFloat extends TestCO
     }
 
     @Test
-    public void testVerySmallValues() throws IOException
+    void testVerySmallValues() throws IOException
     {
         double smallValue = Float.MIN_VALUE / 10d;
 
@@ -343,7 +343,7 @@ public class TestCOSFloat extends TestCO
     }
 
     @Test
-    public void testVeryLargeValues() throws IOException
+    void testVeryLargeValues() throws IOException
     {
         double largeValue = Float.MAX_VALUE * 10d;
 
@@ -374,7 +374,7 @@ public class TestCOSFloat extends TestCO
     }
 
     @Test
-    public void testMisplacedNegative() throws IOException
+    void testMisplacedNegative() throws IOException
     {
         // PDFBOX-2990, PDFBOX-3369 have 0.00000-33917698
         // PDFBOX-3500 has 0.-262
@@ -387,7 +387,7 @@ public class TestCOSFloat extends TestCO
     }
 
     @Test
-    public void testDuplicateMisplacedNegative()
+    void testDuplicateMisplacedNegative()
     {
         assertThrows(IOException.class, () -> new COSFloat("0.-26-2"));
         assertThrows(IOException.class, () -> new COSFloat("-0.-262"));
@@ -396,7 +396,7 @@ public class TestCOSFloat extends TestCO
     }
 
     @Test
-    public void testStubOperatorMinMaxValues()
+    void testStubOperatorMinMaxValues()
     {
         float largeValue = 32768f;
         float largeNegativeValue = -32768f;

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java?rev=1883585&r1=1883584&r2=1883585&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java Wed Nov 18 07:15:41 2020
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Koch
  */
-public class TestCOSInteger extends TestCOSNumber
+class TestCOSInteger extends TestCOSNumber
 {
     @BeforeAll
     static void setUp()
@@ -55,7 +55,7 @@ public class TestCOSInteger extends Test
      * non-nullity.
      */
     @Test
-    public void testEquals()
+    void testEquals()
     {
         // Consistency
         for (int i = -1000; i < 3000; i += 200)
@@ -83,7 +83,7 @@ public class TestCOSInteger extends Test
      * arbitrary values.
      */
     @Test
-    public void testHashCode()
+    void testHashCode()
     {
         for (int i = -1000; i < 3000; i += 200)
         {
@@ -98,7 +98,7 @@ public class TestCOSInteger extends Test
 
     @Override
     @Test
-    public void testFloatValue()
+    void testFloatValue()
     {
         for (int i = -1000; i < 3000; i += 200)
         {
@@ -108,7 +108,7 @@ public class TestCOSInteger extends Test
 
     @Override
     @Test
-    public void testIntValue()
+    void testIntValue()
     {
         for (int i = -1000; i < 3000; i += 200)
         {
@@ -118,7 +118,7 @@ public class TestCOSInteger extends Test
 
     @Override
     @Test
-    public void testLongValue()
+    void testLongValue()
     {
         for (int i = -1000; i < 3000; i += 200)
         {
@@ -128,7 +128,7 @@ public class TestCOSInteger extends Test
 
     @Override
     @Test
-    public void testAccept()
+    void testAccept()
     {
         ByteArrayOutputStream outStream = new ByteArrayOutputStream();
         COSWriter visitor = new COSWriter(outStream);
@@ -154,7 +154,7 @@ public class TestCOSInteger extends Test
      * Tests writePDF() - this method takes an {@link java.io.OutputStream} and writes this object to it.
      */
     @Test
-    public void testWritePDF()
+    void testWritePDF()
     {
         ByteArrayOutputStream outStream = new ByteArrayOutputStream();
         int index = 0;

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSName.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSName.java?rev=1883585&r1=1883584&r2=1883585&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSName.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSName.java Wed Nov 18 07:15:41 2020
@@ -27,7 +27,7 @@ import org.apache.pdfbox.pdmodel.PDDocum
 import org.apache.pdfbox.pdmodel.PDPage;
 import org.junit.jupiter.api.Test;
 
-public class TestCOSName
+class TestCOSName
 {
     /**
      * PDFBOX-4076: Check that characters outside of US_ASCII are not replaced with "?".
@@ -35,7 +35,7 @@ public class TestCOSName
      * @throws IOException 
      */
     @Test
-    public void PDFBox4076() throws IOException
+    void PDFBox4076() throws IOException
     {
         String special = "中国你好!";
         ByteArrayOutputStream baos = new ByteArrayOutputStream();

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSNumber.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSNumber.java?rev=1883585&r1=1883584&r2=1883585&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSNumber.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSNumber.java Wed Nov 18 07:15:41 2020
@@ -30,28 +30,28 @@ import org.junit.jupiter.api.Test;
 /**
  * Test class for {@link COSNumber}
  */
-public abstract class TestCOSNumber extends TestCOSBase
+abstract class TestCOSNumber extends TestCOSBase
 {
     /**
      * Test floatValue() - test that the correct float value is returned.
      */
-    public abstract void testFloatValue();
+    abstract void testFloatValue();
 
     /**
      * Test intValue() - test that the correct int value is returned.
      */
-    public abstract void testIntValue();
+    abstract void testIntValue();
 
     /**
      * Test longValue() - test that the correct long value is returned.
      */
-    public abstract void testLongValue();
+    abstract void testLongValue();
 
     /**
      * Tests get() - tests a static constructor for COSNumber classes.
      */
     @Test
-    public void testGet()
+    void testGet()
     {
         try
         {
@@ -91,14 +91,14 @@ public abstract class TestCOSNumber exte
      * @throws IOException
      */
     @Test
-    public void testLargeNumber() throws IOException
+    void testLargeNumber() throws IOException
     {
         assertNull(COSNumber.get("18446744073307448448"));
         assertNull(COSNumber.get("-18446744073307448448"));
     }
 
     @Test
-    public void testInvalidNumber()
+    void testInvalidNumber()
     {
         try
         {

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSStream.java?rev=1883585&r1=1883584&r2=1883585&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSStream.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSStream.java Wed Nov 18 07:15:41 2020
@@ -31,7 +31,7 @@ import org.apache.pdfbox.filter.FilterFa
 import org.apache.pdfbox.io.IOUtils;
 import org.junit.jupiter.api.Test;
 
-public class TestCOSStream
+class TestCOSStream
 {
     /**
      * Tests encoding of a stream without any filter applied.
@@ -39,7 +39,7 @@ public class TestCOSStream
      * @throws IOException
      */
     @Test
-    public void testUncompressedStreamEncode() throws IOException
+    void testUncompressedStreamEncode() throws IOException
     {
         byte[] testString = "This is a test string to be used as input for TestCOSStream".getBytes("ASCII");
         COSStream stream = createStream(testString, null);
@@ -52,7 +52,7 @@ public class TestCOSStream
      * @throws IOException
      */
     @Test
-    public void testUncompressedStreamDecode() throws IOException
+    void testUncompressedStreamDecode() throws IOException
     {
         byte[] testString = "This is a test string to be used as input for TestCOSStream".getBytes("ASCII");
         COSStream stream = createStream(testString, null);
@@ -65,7 +65,7 @@ public class TestCOSStream
      * @throws IOException
      */
     @Test
-    public void testCompressedStream1Encode() throws IOException
+    void testCompressedStream1Encode() throws IOException
     {
         byte[] testString = "This is a test string to be used as input for TestCOSStream".getBytes("ASCII");
         byte[] testStringEncoded = encodeData(testString, COSName.FLATE_DECODE);
@@ -79,7 +79,7 @@ public class TestCOSStream
      * @throws IOException
      */
     @Test
-    public void testCompressedStream1Decode() throws IOException
+    void testCompressedStream1Decode() throws IOException
     {
         byte[] testString = "This is a test string to be used as input for TestCOSStream".getBytes("ASCII");
         byte[] testStringEncoded = encodeData(testString, COSName.FLATE_DECODE);
@@ -100,7 +100,7 @@ public class TestCOSStream
      * @throws IOException
      */
     @Test
-    public void testCompressedStream2Encode() throws IOException
+    void testCompressedStream2Encode() throws IOException
     {
         byte[] testString = "This is a test string to be used as input for TestCOSStream".getBytes("ASCII");
         byte[] testStringEncoded = encodeData(testString, COSName.FLATE_DECODE);
@@ -120,7 +120,7 @@ public class TestCOSStream
      * @throws IOException
      */
     @Test
-    public void testCompressedStream2Decode() throws IOException
+    void testCompressedStream2Decode() throws IOException
     {
         byte[] testString = "This is a test string to be used as input for TestCOSStream".getBytes("ASCII");
         byte[] testStringEncoded = encodeData(testString, COSName.FLATE_DECODE);
@@ -148,7 +148,7 @@ public class TestCOSStream
      * @throws IOException
      */
     @Test
-    public void testCompressedStreamDoubleClose() throws IOException
+    void testCompressedStreamDoubleClose() throws IOException
     {
         byte[] testString = "This is a test string to be used as input for TestCOSStream".getBytes("ASCII");
         byte[] testStringEncoded = encodeData(testString, COSName.FLATE_DECODE);
@@ -161,7 +161,7 @@ public class TestCOSStream
     }
 
     @Test
-    public void testHasStreamData() throws IOException
+    void testHasStreamData() throws IOException
     {
         COSStream stream = new COSStream();
         assertFalse(stream.hasData());

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSString.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSString.java?rev=1883585&r1=1883584&r2=1883585&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSString.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSString.java Wed Nov 18 07:15:41 2020
@@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test;
  *
  * Ben Litchfield
  */
-public class TestCOSString extends TestCOSBase
+class TestCOSString extends TestCOSBase
 {
     private static final String ESC_CHAR_STRING =
             "( test#some) escaped< \\chars>!~1239857 ";
@@ -55,7 +55,7 @@ public class TestCOSString extends TestC
      * different String output forms within PDF. 
      */
     @Test
-    public void testSetForceHexLiteralForm()
+    void testSetForceHexLiteralForm()
     {
         String inputString = "Test with a text and a few numbers 1, 2 and 3";
         String pdfHex = "<" + createHex(inputString) + ">";
@@ -94,7 +94,7 @@ public class TestCOSString extends TestC
      * Test parseHex() - tests that the proper String is created from a hex string input.
      */
     @Test
-    public void testFromHex()
+    void testFromHex()
     {
         String expected = "Quick and simple test";
         String hexForm = createHex(expected);
@@ -127,7 +127,7 @@ public class TestCOSString extends TestC
      * Tests getHex() - ensure the hex String returned is properly formatted.
      */
     @Test
-    public void testGetHex()
+    void testGetHex()
     {
         String expected = "Test subject for testing getHex";
         COSString test1 = new COSString(expected);
@@ -143,7 +143,7 @@ public class TestCOSString extends TestC
      * Test testGetString() - ensure getString() are returned in the correct format.
      */
     @Test
-    public void testGetString()
+    void testGetString()
     {
         try
         {
@@ -171,7 +171,7 @@ public class TestCOSString extends TestC
      * Test getBytes() - again not much to test, just ensure the proper byte array is returned.
      */
     @Test
-    public void testGetBytes()
+    void testGetBytes()
     {
         COSString str = new COSString(ESC_CHAR_STRING);
         testByteArrays(ESC_CHAR_STRING.getBytes(), str.getBytes());
@@ -181,7 +181,7 @@ public class TestCOSString extends TestC
      * Tests writePDF() - tests that the string is in PDF format.
      */
     @Test
-    public void testWritePDF()
+    void testWritePDF()
     {
         // This has been tested quite thorougly above but do a couple tests anyway
         COSString testSubj = new COSString(ESC_CHAR_STRING);
@@ -197,7 +197,7 @@ public class TestCOSString extends TestC
      * @throws IOException If there is an exception while encoding.
      */
     @Test
-    public void testUnicode() throws IOException
+    void testUnicode() throws IOException
     {
         String theString = "\u4e16";
         COSString string = new COSString(theString);
@@ -257,7 +257,7 @@ public class TestCOSString extends TestC
 
     @Override
     @Test
-    public void testAccept() throws IOException
+    void testAccept() throws IOException
     {
         ByteArrayOutputStream outStream = new ByteArrayOutputStream();
         ICOSVisitor visitor = new COSWriter(outStream);
@@ -274,7 +274,7 @@ public class TestCOSString extends TestC
      * Tests equals(Object) - ensure that the Object.equals() contract is obeyed.
      */
     @Test
-    public void testEquals()
+    void testEquals()
     {
         // Check all these several times for consistency
         for (int i = 0; i < 10; i++)
@@ -309,7 +309,7 @@ public class TestCOSString extends TestC
      * Test hashCode() - tests that the Object.hashCode() contract is obeyed.
      */
     @Test
-    public void testHashCode()
+    void testHashCode()
     {
         COSString str1 = new COSString("Test1");
         COSString str2 = new COSString("Test2");
@@ -328,7 +328,7 @@ public class TestCOSString extends TestC
      */
     @SuppressWarnings({"java:S5863"}) // don't flag tests for reflexivity
     @Test
-    public void testCompareFromHexString() throws IOException
+    void testCompareFromHexString() throws IOException
     {
         COSString test1 = COSString.parseHex("000000FF000000");
         COSString test2 = COSString.parseHex("000000FF00FFFF");
@@ -347,7 +347,7 @@ public class TestCOSString extends TestC
      * @throws IOException 
      */
     @Test
-    public void testEmptyStringWithBOM() throws IOException
+    void testEmptyStringWithBOM() throws IOException
     {
         assertTrue(COSString.parseHex("FEFF").getString().isEmpty());
         assertTrue(COSString.parseHex("FFFE").getString().isEmpty());

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSUpdateInfo.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSUpdateInfo.java?rev=1883585&r1=1883584&r2=1883585&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSUpdateInfo.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSUpdateInfo.java Wed Nov 18 07:15:41 2020
@@ -25,14 +25,14 @@ import org.junit.jupiter.api.Test;
 /**
  * Test class for {@link COSUpdateInfo}.
  */
-public class TestCOSUpdateInfo
+class TestCOSUpdateInfo
 {
     
     /**
      * Tests isNeedToBeUpdate() and setNeedToBeUpdate() - tests the getter/setter methods.
      */
     @Test
-    public void testIsSetNeedToBeUpdate()
+    void testIsSetNeedToBeUpdate()
     {
         // COSDictionary
         COSUpdateInfo testCOSDictionary = new COSDictionary();

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/UnmodifiableCOSDictionaryTest.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/UnmodifiableCOSDictionaryTest.java?rev=1883585&r1=1883584&r2=1883585&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/UnmodifiableCOSDictionaryTest.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/UnmodifiableCOSDictionaryTest.java Wed Nov 18 07:15:41 2020
@@ -23,10 +23,10 @@ import java.util.Calendar;
 import org.apache.pdfbox.pdmodel.font.encoding.Encoding;
 import org.junit.jupiter.api.Test;
 
-public class UnmodifiableCOSDictionaryTest
+class UnmodifiableCOSDictionaryTest
 {
     @Test
-    public void testUnmodifiableCOSDictionary()
+    void testUnmodifiableCOSDictionary()
     {
         COSDictionary unmodifiableCOSDictionary = new COSDictionary().asUnmodifiableDictionary();
         try
@@ -82,7 +82,7 @@ public class UnmodifiableCOSDictionaryTe
     }
 
     @Test
-    public void testSetItem()
+    void testSetItem()
     {
         COSDictionary unmodifiableCOSDictionary = new COSDictionary().asUnmodifiableDictionary();
         try
@@ -128,7 +128,7 @@ public class UnmodifiableCOSDictionaryTe
     }
 
     @Test
-    public void testSetBoolean()
+    void testSetBoolean()
     {
         COSDictionary unmodifiableCOSDictionary = new COSDictionary().asUnmodifiableDictionary();
         try
@@ -153,7 +153,7 @@ public class UnmodifiableCOSDictionaryTe
     }
 
     @Test
-    public void testSetName()
+    void testSetName()
     {
         COSDictionary unmodifiableCOSDictionary = new COSDictionary().asUnmodifiableDictionary();
         try
@@ -178,7 +178,7 @@ public class UnmodifiableCOSDictionaryTe
     }
 
     @Test
-    public void testSetDate()
+    void testSetDate()
     {
         COSDictionary unmodifiableCOSDictionary = new COSDictionary().asUnmodifiableDictionary();
         Calendar calendar = Calendar.getInstance();
@@ -204,7 +204,7 @@ public class UnmodifiableCOSDictionaryTe
     }
 
     @Test
-    public void testSetEmbeddedDate()
+    void testSetEmbeddedDate()
     {
         COSDictionary unmodifiableCOSDictionary = new COSDictionary().asUnmodifiableDictionary();
         Calendar calendar = Calendar.getInstance();
@@ -230,7 +230,7 @@ public class UnmodifiableCOSDictionaryTe
     }
 
     @Test
-    public void testSetString()
+    void testSetString()
     {
         COSDictionary unmodifiableCOSDictionary = new COSDictionary().asUnmodifiableDictionary();
         try
@@ -255,7 +255,7 @@ public class UnmodifiableCOSDictionaryTe
     }
 
     @Test
-    public void testSetEmbeddedString()
+    void testSetEmbeddedString()
     {
         COSDictionary unmodifiableCOSDictionary = new COSDictionary().asUnmodifiableDictionary();
         try
@@ -280,7 +280,7 @@ public class UnmodifiableCOSDictionaryTe
     }
 
     @Test
-    public void testSetInt()
+    void testSetInt()
     {
         COSDictionary unmodifiableCOSDictionary = new COSDictionary().asUnmodifiableDictionary();
         try
@@ -305,7 +305,7 @@ public class UnmodifiableCOSDictionaryTe
     }
 
     @Test
-    public void testSetEmbeddedInt()
+    void testSetEmbeddedInt()
     {
         COSDictionary unmodifiableCOSDictionary = new COSDictionary().asUnmodifiableDictionary();
         try
@@ -330,7 +330,7 @@ public class UnmodifiableCOSDictionaryTe
     }
 
     @Test
-    public void testSetLong()
+    void testSetLong()
     {
         COSDictionary unmodifiableCOSDictionary = new COSDictionary().asUnmodifiableDictionary();
         try
@@ -355,7 +355,7 @@ public class UnmodifiableCOSDictionaryTe
     }
 
     @Test
-    public void testSetFloat()
+    void testSetFloat()
     {
         COSDictionary unmodifiableCOSDictionary = new COSDictionary().asUnmodifiableDictionary();
         try

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestPublicKeyEncryption.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestPublicKeyEncryption.java?rev=1883585&r1=1883584&r2=1883585&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestPublicKeyEncryption.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestPublicKeyEncryption.java Wed Nov 18 07:15:41 2020
@@ -51,7 +51,7 @@ import org.junit.jupiter.params.provider
  *
  * @author Ben Litchfield
  */
-public class TestPublicKeyEncryption
+class TestPublicKeyEncryption
 {
     private final File testResultsDir = new File("target/test-output/crypto");
 
@@ -152,7 +152,7 @@ public class TestPublicKeyEncryption
      */
     @ParameterizedTest
 	@MethodSource("keyLengths")
-    public void testProtectionError(int keyLength) throws Exception
+    void testProtectionError(int keyLength) throws Exception
     {
         PublicKeyProtectionPolicy policy = new PublicKeyProtectionPolicy();
         policy.addRecipient(recipient1);
@@ -190,7 +190,7 @@ public class TestPublicKeyEncryption
      */
     @ParameterizedTest
     @MethodSource("keyLengths")
-    public void testProtection(int keyLength) throws Exception
+    void testProtection(int keyLength) throws Exception
     {
         PublicKeyProtectionPolicy policy = new PublicKeyProtectionPolicy();
         policy.addRecipient(recipient1);
@@ -222,7 +222,7 @@ public class TestPublicKeyEncryption
      */
     @ParameterizedTest
     @MethodSource("keyLengths")
-    public void testMultipleRecipients(int keyLength) throws Exception
+    void testMultipleRecipients(int keyLength) throws Exception
     {
         PublicKeyProtectionPolicy policy = new PublicKeyProtectionPolicy();
         policy.addRecipient(recipient1);
@@ -322,7 +322,7 @@ public class TestPublicKeyEncryption
      */
     @ParameterizedTest
     @MethodSource("keyLengths")
-    public void testReadPubkeyEncryptedAES128(int keyLength) throws IOException
+    void testReadPubkeyEncryptedAES128(int keyLength) throws IOException
     {
         try (InputStream is = TestPublicKeyEncryption.class.getResourceAsStream("AESkeylength128.pdf");
              PDDocument doc = Loader.loadPDF(is,
@@ -346,7 +346,7 @@ public class TestPublicKeyEncryption
      */
     @ParameterizedTest
     @MethodSource("keyLengths")
-    public void testReadPubkeyEncryptedAES256(int keyLength) throws IOException
+    void testReadPubkeyEncryptedAES256(int keyLength) throws IOException
     {
         try (InputStream is = TestPublicKeyEncryption.class.getResourceAsStream("AESkeylength256.pdf");
              PDDocument doc = Loader.loadPDF(is,

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java?rev=1883585&r1=1883584&r2=1883585&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java Wed Nov 18 07:15:41 2020
@@ -73,7 +73,7 @@ import org.junit.jupiter.api.Test;
  * @author Tilman Hausherr
  *
  */
-public class TestSymmetricKeyEncryption
+class TestSymmetricKeyEncryption
 {
     /**
      * Logger instance.
@@ -122,7 +122,7 @@ public class TestSymmetricKeyEncryption
      * @throws java.io.IOException
      */
     @Test
-    public void testPermissions() throws IOException
+    void testPermissions() throws IOException
     {
         AccessPermission fullAP = new AccessPermission();
         AccessPermission restrAP = new AccessPermission();
@@ -206,7 +206,7 @@ public class TestSymmetricKeyEncryption
      * @throws Exception If there is an unexpected error during the test.
      */
     @Test
-    public void testProtection() throws Exception
+    void testProtection() throws Exception
     {
         byte[] inputFileAsByteArray = getFileResourceAsByteArray("Acroform-PDFBOX-2333.pdf");
         int sizePriorToEncryption = inputFileAsByteArray.length;
@@ -236,7 +236,7 @@ public class TestSymmetricKeyEncryption
      * @throws IOException
      */
     @Test
-    public void testPDFBox4308() throws IOException
+    void testPDFBox4308() throws IOException
     {
         byte[] inputFileAsByteArray = Files.readAllBytes(Paths.get("target/pdfs/PDFBOX-4308.pdf"));
         int sizePriorToEncryption = inputFileAsByteArray.length;
@@ -252,7 +252,7 @@ public class TestSymmetricKeyEncryption
      * @throws Exception If there is an unexpected error during the test.
      */
     @Test
-    public void testProtectionInnerAttachment() throws Exception
+    void testProtectionInnerAttachment() throws Exception
     {
         String testFileName = "preEnc_20141025_105451.pdf";
         byte[] inputFileWithEmbeddedFileAsByteArray = getFileResourceAsByteArray(testFileName);
@@ -281,7 +281,7 @@ public class TestSymmetricKeyEncryption
      * @throws IOException 
      */
     @Test
-    public void testPDFBox4453() throws IOException
+    void testPDFBox4453() throws IOException
     {
         final int TESTCOUNT = 1000;
         File file = new File(testResultsDir,"PDFBOX-4453.pdf");