summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java19
1 files changed, 6 insertions, 13 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java
index 955097fc..f6c1eb29 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java
@@ -60,14 +60,7 @@ public class CertificateDownloadSource {
URL url = new URL(Constants.CERTIFICATE_DOWNLOAD_XML_URL+Constants.CERTIFICATE_XML_FILE);
URLConnection connection = url.openConnection();
InputStream is = connection.getInputStream();
-
- int b = is.read();
- if (b==-1)
- {
- log.info("Cannot read file");
- }
- else
- {
+
BufferedInputStream bis = new BufferedInputStream(is);
FileOutputStream fis2 = new FileOutputStream(new File(Constants.RES_CERT_LIST_ADDED));
@@ -80,7 +73,7 @@ public class CertificateDownloadSource {
fis2.close();
bis.close();
downloadCertificatesFromServer();
- }
+
} catch (IOException e) {
log.debug("File not found");}
@@ -110,9 +103,7 @@ public class CertificateDownloadSource {
Node certificates_added = doc_added.getFirstChild();
NodeList certificates_added_list = certificates_added.getChildNodes();
-
- if (doc_added.hasChildNodes())
- {
+
//identify the certificate that has to be downloaded
for (int i = 0; i < certificates_added_list.getLength(); i++) {
try {
@@ -152,7 +143,9 @@ public class CertificateDownloadSource {
}
}
- }}
+ }
+
+
} catch (IOException e) {
e.printStackTrace();