Author: tilman
Date: Sun Jun 7 12:20:09 2026
New Revision: 1935102
Log:
PDFBOX-5660: Sonar fix
Modified:
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFCloneUtility.java
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SecurityHandler.java
Modified:
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFCloneUtility.java
==============================================================================
---
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFCloneUtility.java
Sun Jun 7 12:20:06 2026 (r1935101)
+++
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFCloneUtility.java
Sun Jun 7 12:20:09 2026 (r1935102)
@@ -74,13 +74,13 @@ public class PDFCloneUtility
*
* Expert use only, don’t use it if you don’t know exactly what you are
doing.
*
- * @param <TCOSBase> The type to be returned.
+ * @param <TCOSBASE> The type to be returned.
* @param base the initial object as the root of the deep-clone operation
* @return the cloned instance of the base object
* @throws IOException if an I/O error occurs
*/
@SuppressWarnings("unchecked")
- public <TCOSBase extends COSBase> TCOSBase cloneForNewDocument(TCOSBase
base) throws IOException
+ public <TCOSBASE extends COSBase> TCOSBASE cloneForNewDocument(TCOSBASE
base) throws IOException
{
if (base == null)
{
@@ -90,7 +90,7 @@ public class PDFCloneUtility
if (retval != null)
{
// we are done, it has already been converted.
- return (TCOSBase) retval;
+ return (TCOSBASE) retval;
}
if (clonedValues.contains(base))
{
@@ -100,7 +100,7 @@ public class PDFCloneUtility
retval = cloneCOSBaseForNewDocument(base);
clonedVersion.put(base, retval);
clonedValues.add(retval);
- return (TCOSBase) retval;
+ return (TCOSBASE) retval;
}
private COSBase cloneCOSBaseForNewDocument(COSBase base) throws IOException
Modified:
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SecurityHandler.java
==============================================================================
---
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SecurityHandler.java
Sun Jun 7 12:20:06 2026 (r1935101)
+++
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SecurityHandler.java
Sun Jun 7 12:20:09 2026 (r1935102)
@@ -56,9 +56,9 @@ import org.apache.pdfbox.pdmodel.PDDocum
* @author Benoit Guillon
* @author Manuel Kasper
*
- * @param <T_POLICY> the protection policy.
+ * @param <TPOLICY> the protection policy.
*/
-public abstract class SecurityHandler<T_POLICY extends ProtectionPolicy>
+public abstract class SecurityHandler<TPOLICY extends ProtectionPolicy>
{
private static final Logger LOG =
LogManager.getLogger(SecurityHandler.class);
@@ -94,7 +94,7 @@ public abstract class SecurityHandler<T_
/**
* The typed {@link ProtectionPolicy} to be used for encryption.
*/
- private T_POLICY protectionPolicy = null;
+ private TPOLICY protectionPolicy = null;
/**
* The access permission granted to the current user for the document.
These
@@ -124,7 +124,7 @@ public abstract class SecurityHandler<T_
*
* @param protectionPolicy The protection policy.
*/
- protected SecurityHandler(T_POLICY protectionPolicy)
+ protected SecurityHandler(TPOLICY protectionPolicy)
{
this.protectionPolicy = protectionPolicy;
keyLength = (short) protectionPolicy.getEncryptionKeyLength();
@@ -815,7 +815,7 @@ public abstract class SecurityHandler<T_
*
* @return The set {@link ProtectionPolicy}.
*/
- protected T_POLICY getProtectionPolicy()
+ protected TPOLICY getProtectionPolicy()
{
return protectionPolicy;
}
@@ -824,7 +824,7 @@ public abstract class SecurityHandler<T_
* Sets the {@link ProtectionPolicy} to the given value.
* @param protectionPolicy The {@link ProtectionPolicy}, that shall be set.
*/
- protected void setProtectionPolicy(T_POLICY protectionPolicy)
+ protected void setProtectionPolicy(TPOLICY protectionPolicy)
{
this.protectionPolicy = protectionPolicy;
}