summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Heher <jakob.heher@iaik.tugraz.at>2022-07-07 15:38:46 +0200
committerJakob Heher <jakob.heher@iaik.tugraz.at>2022-07-07 15:38:46 +0200
commit04a3b1d060e8ecb08e43e9ecf3b7fa3e1d48d362 (patch)
treef7752f13421323d44f052f7175768a12a99d7e2b
parente568e0adf216569b5a0baed85d2d5e09b5d5d7f8 (diff)
downloadpdf-over-04a3b1d060e8ecb08e43e9ecf3b7fa3e1d48d362.tar.gz
pdf-over-04a3b1d060e8ecb08e43e9ecf3b7fa3e1d48d362.tar.bz2
pdf-over-04a3b1d060e8ecb08e43e9ecf3b7fa3e1d48d362.zip
cleanup unused imports/methods
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java4
-rw-r--r--pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signator.java6
-rw-r--r--pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignerFactory.java2
-rw-r--r--pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java7
-rw-r--r--pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SigningState.java2
5 files changed, 4 insertions, 17 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java
index 0aaf52a6..eab3de92 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java
@@ -17,9 +17,6 @@ package at.asit.pdfover.gui;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-// Imports
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import at.asit.pdfover.commons.Messages;
@@ -42,7 +39,6 @@ public class PlaceholderSelectionGui extends Dialog {
/**
* SLF4J Logger instance
**/
- private static final Logger log = LoggerFactory.getLogger(PlaceholderSelectionGui.class);
protected Object result;
protected Shell shlInfo;
protected Combo placeholderNameDropDown;
diff --git a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signator.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signator.java
index 31cf18be..798788d2 100644
--- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signator.java
+++ b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signator.java
@@ -18,6 +18,8 @@ package at.asit.pdfover.signator;
//Imports
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+
+import java.lang.reflect.InvocationTargetException;
import java.util.EnumMap;
import java.util.Map;
@@ -55,12 +57,12 @@ public class Signator {
// SignerFactory factory = (SignerFactory)pdfAsClass.newInstance();
// registerSigner(Signers.PDFAS, factory);
Class<?> pdfAs4Class = Class.forName("at.asit.pdfover.signer.pdfas.PdfAs4SignerFactory");
- SignerFactory factory = (SignerFactory)pdfAs4Class.newInstance();
+ SignerFactory factory = (SignerFactory)pdfAs4Class.getDeclaredConstructor().newInstance();
registerSigner(Signers.PDFAS4, factory);
} catch (ClassNotFoundException e) {
log.error("PDF Signer Factory not found", e);
throw new RuntimeException("PDF Signer Factory not found", e);
- } catch (InstantiationException e) {
+ } catch (InstantiationException | InvocationTargetException | NoSuchMethodException e) {
log.error("PDF Signer Factory could not be instantiated", e);
throw new RuntimeException("PDF Signer Factory could not be instantiated", e);
} catch (IllegalAccessException e) {
diff --git a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignerFactory.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignerFactory.java
index 24b86300..cde150f8 100644
--- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignerFactory.java
+++ b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignerFactory.java
@@ -15,8 +15,6 @@
*/
package at.asit.pdfover.signator;
-import at.asit.pdfover.signator.Signer;
-
/**
* A Signer factory
* Creates Signer instances
diff --git a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java
index fc469bf6..127df8cf 100644
--- a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java
+++ b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java
@@ -212,13 +212,6 @@ public class PdfAs4SignatureParameter extends SignatureParameter {
return profileId;
}
- private String getProfileName() {
- if (this.profile == null) {
- this.profile = Profile.SIGNATURBLOCK_SMALL.name();
- }
- return Profile.getProfile(this.profile).name();
- }
-
private String getLangProfilePart(String lang) {
return (lang != null && lang.equals("en")) ? PROFILE_ID_LANG_EN : PROFILE_ID_LANG_DE;
}
diff --git a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SigningState.java b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SigningState.java
index 8d8456b8..f0aff1c8 100644
--- a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SigningState.java
+++ b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SigningState.java
@@ -56,8 +56,6 @@ public class PdfAs4SigningState implements SigningState {
private boolean useBase64Request;
- private boolean searchForPlaceholderSignature;
-
/* (non-Javadoc)
* @see at.asit.pdfover.signator.SigningState#getSignatureRequest()
*/