diff options
author | Andreas Abraham <andreas.abraham@egiz.gv.at> | 2020-11-20 07:46:39 +0100 |
---|---|---|
committer | Andreas Abraham <andreas.abraham@egiz.gv.at> | 2020-11-20 07:46:39 +0100 |
commit | 86d77f8df8e831a2794be6a96c005f5eaf5b3016 (patch) | |
tree | 1f57059de3f46ced1a5ef461470a4bc2c318f740 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils | |
parent | 3fe8080081427838ef4e3f60ef50461c5aa2fbcf (diff) | |
parent | a224ce26811102d97ab02a33f3befcba311e0a62 (diff) | |
download | pdf-over-86d77f8df8e831a2794be6a96c005f5eaf5b3016.tar.gz pdf-over-86d77f8df8e831a2794be6a96c005f5eaf5b3016.tar.bz2 pdf-over-86d77f8df8e831a2794be6a96c005f5eaf5b3016.zip |
Merge branch 'feature/sigProfiles' into 'master'
Feature/sig profiles
See merge request egiz/pdf-over!2
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.java | 10 | ||||
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java | 15 |
2 files changed, 10 insertions, 15 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 ad4fa70e..6ce5b176 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 @@ -85,7 +85,7 @@ public class CertificateDownloadSource { - if (!cp.getProxyHost().equals("")) { + if (!cp.getProxyHost().equals("")) { //$NON-NLS-1$ log.info("Found PDF-Over Host settings: "+cp.getProxyHost().toString()); //$NON-NLS-1$ try{ @@ -103,7 +103,7 @@ public class CertificateDownloadSource { {log.info("Illegal Argument for Proxy and/or Host)");} //$NON-NLS-1$ } else { - log.info("Opening default connection"); + log.info("Opening default connection"); //$NON-NLS-1$ connection = url.openConnection(); } @@ -131,7 +131,7 @@ public class CertificateDownloadSource { Document doc = dBuilder.newDocument(); // root element - Node rootElement = doc.createElement("certificates"); + Node rootElement = doc.createElement("certificates"); //$NON-NLS-1$ doc.appendChild(rootElement); TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); @@ -169,7 +169,7 @@ public class CertificateDownloadSource { Node certificates_added = doc_added.getFirstChild(); NodeList certificates_added_list = certificates_added.getChildNodes(); - log.info("===== Starting to download accepted certificates ====="); + log.info("===== Starting to download accepted certificates ====="); //$NON-NLS-1$ // identify the certificate that has to be downloaded for (int i = 0; i < certificates_added_list.getLength(); i++) { @@ -187,7 +187,7 @@ public class CertificateDownloadSource { } URLConnection connection; - if (!certificateNode.getTextContent().equals("")) { + if (!certificateNode.getTextContent().equals("")) { //$NON-NLS-1$ String certResource = Constants.CERTIFICATE_DOWNLOAD_XML_URL + certificateNode.getTextContent(); URL url = new URL(certResource); diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java index 6271656c..c48337e6 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java @@ -38,10 +38,7 @@ public class Messages { private static final String BUNDLE_NAME = "at.asit.pdfover.gui.messages"; //$NON-NLS-1$ - private static HashMap<Locale, ResourceBundle> bundles = new HashMap<Locale, ResourceBundle>(); - - //private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle - // .getBundle(BUNDLE_NAME); + private static HashMap<Locale, ResourceBundle> bundles = new HashMap<>(); private static Locale currentLocale = getDefaultLocale(); @@ -71,17 +68,17 @@ public class Messages { private static ResourceBundle getBundle(Locale locale) { if(!bundles.containsKey(locale)) { - log.debug("Loading resource bundle for " + locale); //$NON-NLS-1$ + log.debug("Loading resource bundle for {}", locale); //$NON-NLS-1$ ResourceBundle tmp = null; try { tmp = ResourceBundle.getBundle(BUNDLE_NAME, locale); - log.debug("Received bundle for " + tmp.getLocale()); //$NON-NLS-1$ + log.debug("Received bundle for {}", tmp.getLocale()); //$NON-NLS-1$ } catch(Exception e) { - log.error("NO RESOURCE BUNDLE FOR " + locale.toString(), e); //$NON-NLS-1$ + log.error("NO RESOURCE BUNDLE FOR {} {}", locale, e); //$NON-NLS-1$ tmp = ResourceBundle.getBundle(BUNDLE_NAME); } if(tmp == null) { - log.error("NO RESOURCE BUNDLE FOR " + locale.toString()); //$NON-NLS-1$ + log.error("NO RESOURCE BUNDLE FOR {}", locale); //$NON-NLS-1$ tmp = ResourceBundle.getBundle(BUNDLE_NAME); } bundles.put(locale, tmp); @@ -98,7 +95,6 @@ public class Messages { public static String getString(String key) { try { return getBundle(currentLocale).getString(key); - //return RESOURCE_BUNDLE.getString(key); } catch (MissingResourceException e) { return '!' + key + '!'; } @@ -113,7 +109,6 @@ public class Messages { public static String getString(String key, Locale locale) { try { return getBundle(locale).getString(key); - //return RESOURCE_BUNDLE.getString(key); } catch (MissingResourceException e) { return '!' + key + '!'; } |