summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
diff options
context:
space:
mode:
authorJakob Heher <jakob.heher@iaik.tugraz.at>2022-07-06 12:33:33 +0200
committerJakob Heher <jakob.heher@iaik.tugraz.at>2022-07-06 12:33:33 +0200
commite4767bccc7324d4b61a334bf6c0558d0080045e2 (patch)
tree728a5df44f02ca10f760b979873c990cd4c0d265 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
parent3422e5eb2819f5de304f25dc622f5284813bb9b4 (diff)
downloadpdf-over-e4767bccc7324d4b61a334bf6c0558d0080045e2.tar.gz
pdf-over-e4767bccc7324d4b61a334bf6c0558d0080045e2.tar.bz2
pdf-over-e4767bccc7324d4b61a334bf6c0558d0080045e2.zip
remove NON-NLS comments, cleanup whitespace
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
index 4b329b47..12412b42 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
@@ -38,12 +38,12 @@ import at.asit.pdfover.signator.Signer;
public class SigningState extends State {
/**
- *
+ *
*/
private final class FinishSignThread implements Runnable {
-
+
private SigningState state;
-
+
/**
* @param signingState
*/
@@ -56,7 +56,7 @@ public class SigningState extends State {
try {
Signer signer = this.state.getStateMachine().getPDFSigner().getPDFSigner();
Status status = this.state.getStateMachine().getStatus();
-
+
status.setSignResult(signer.sign(status.getSigningState()));
} catch(Exception e) {
this.state.threadException = e;
@@ -77,20 +77,20 @@ public class SigningState extends State {
* SLF4J Logger instance
**/
static final Logger log = LoggerFactory.getLogger(SigningState.class);
-
+
Exception threadException = null;
-
+
@Override
public void run() {
Status status = getStateMachine().getStatus();
-
- if(status.getSignResult() == null &&
+
+ if(status.getSignResult() == null &&
this.threadException == null) {
Thread t = new Thread(new FinishSignThread(this));
t.start();
return;
}
-
+
if(this.threadException != null) {
// workaround for PDF-AS nullpointerexception intercepting our IllegalStateException
// cf. issue #52
@@ -102,19 +102,19 @@ public class SigningState extends State {
this.threadException = new SignatureException(new IllegalStateException());
}
- String message = Messages.getString("error.Signatur"); //$NON-NLS-1$
+ String message = Messages.getString("error.Signatur"); //
if (this.threadException instanceof SignatureException) {
Throwable cause = this.threadException;
while (cause.getCause() != null)
cause = cause.getCause();
if (cause instanceof ConnectException)
- message += ": " + cause.getMessage(); //$NON-NLS-1$
+ message += ": " + cause.getMessage(); //
if (cause instanceof IllegalStateException) {
// Dummy exception - don't display error, go back to BKU Selection
this.setNextState(new BKUSelectionState(getStateMachine()));
return;
}
-
+
}
// if we have gotten to this point, this is an actual exception