From 3567221910f8ceb4f1a0522dfe467e6e9ed300b5 Mon Sep 17 00:00:00 2001 From: Bianca Schnalzer Date: Wed, 23 Aug 2017 11:48:53 +0200 Subject: Improved Error Handling Download-URL --- .../asit/pdfover/gui/workflow/StateMachineImpl.java | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java index b2367a85..6ff121bb 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java @@ -20,6 +20,7 @@ import java.io.FileNotFoundException; import java.io.FileOutputStream; //Imports import java.lang.reflect.Constructor; +import java.nio.file.Files; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; @@ -257,24 +258,8 @@ public class StateMachineImpl implements StateMachine, GUIProvider { // Call update to start processing ... update(); - try { - File certificates = new File (Constants.RES_CERT_LIST_ADDED); - if (!certificates.exists()) - { - - FileOutputStream fis = new FileOutputStream(new File(Constants.RES_CERT_LIST_ADDED)); - CertificateDownloadSource.getAcceptedCertificates(); - - - } - else - { - CertificateDownloadSource.getAcceptedCertificates(); - } - } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } + CertificateDownloadSource.getAcceptedCertificates(); + // if a user interaction is required we have a shell ... -- cgit v1.2.3