gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-libeufin] 21/25: Fix resource loading from JAR.


From: gnunet
Subject: [GNUnet-SVN] [taler-libeufin] 21/25: Fix resource loading from JAR.
Date: Fri, 20 Sep 2019 19:32:59 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository libeufin.

commit 3c513525298b7269890c43dcf30a7e7d88ce4c26
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Sep 18 23:31:29 2019 +0200

    Fix resource loading from JAR.
---
 src/main/java/tech/libeufin/XMLManagement.java | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/main/java/tech/libeufin/XMLManagement.java 
b/src/main/java/tech/libeufin/XMLManagement.java
index 1bccda7..664e0d6 100644
--- a/src/main/java/tech/libeufin/XMLManagement.java
+++ b/src/main/java/tech/libeufin/XMLManagement.java
@@ -38,9 +38,8 @@ public class XMLManagement {
      */
     public XMLManagement(){
         ClassLoader classLoader = this.getClass().getClassLoader();
-
-        File ebics_hev_file = new 
File(classLoader.getResource("ebics_hev.xsd").getFile());
-        Source schemas[] = {new StreamSource(ebics_hev_file)
+        InputStream ebics_hev_path = 
classLoader.getResourceAsStream("ebics_hev.xsd");
+        Source schemas[] = {new StreamSource(ebics_hev_path)
                 // other StreamSources for other schemas here ..
         };
 
@@ -49,7 +48,7 @@ public class XMLManagement {
             this.bundle = sf.newSchema(schemas);
             this.validator = this.bundle.newValidator();
         } catch (SAXException e) {
-            System.out.println("SAX exception shall never happen here " + "(" 
+ e + ")");
+            e.printStackTrace();
         }
     }
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]