From d65427e43c30e17cd0368115f7aaeb2d690e1b6e Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:34:30 +0000 Subject: Move resource strings to Constants git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@389 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../gui/workflow/states/mobilebku/SimpleXMLTrustManager.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/SimpleXMLTrustManager.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/SimpleXMLTrustManager.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/SimpleXMLTrustManager.java index d08dcfe5..6d72e856 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/SimpleXMLTrustManager.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/SimpleXMLTrustManager.java @@ -33,6 +33,8 @@ import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; +import at.asit.pdfover.gui.Constants; + /** * */ @@ -43,9 +45,6 @@ public class SimpleXMLTrustManager implements X509TrustManager { private static final Logger log = LoggerFactory .getLogger(SimpleXMLTrustManager.class); - private static final String certificateList = "/certificates/certificates.xml"; //$NON-NLS-1$ - - /* * The default X509TrustManager returned by SunX509. We'll delegate * decisions to it, and fall back to the logic in this class if the default @@ -93,7 +92,7 @@ public class SimpleXMLTrustManager implements X509TrustManager { Document doc = DocumentBuilderFactory.newInstance() .newDocumentBuilder() - .parse(this.getClass().getResourceAsStream(certificateList)); + .parse(this.getClass().getResourceAsStream(Constants.RES_CERT_LIST)); Node certificates = doc.getFirstChild(); @@ -118,7 +117,7 @@ public class SimpleXMLTrustManager implements X509TrustManager { continue; } - String certResource = "/certificates/" + certificateNode.getTextContent(); //$NON-NLS-1$ + String certResource = Constants.RES_CERT_PATH + certificateNode.getTextContent(); X509Certificate cert = (X509Certificate) CertificateFactory .getInstance("X509"). //$NON-NLS-1$ -- cgit v1.2.3