[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] 02/02: make XML validation unparallel
From: |
gnunet |
Subject: |
[libeufin] 02/02: make XML validation unparallel |
Date: |
Wed, 06 Jul 2022 17:06:44 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
commit a1df899228d936b3fc4c520ad7229f2fe1b70293
Author: MS <ms@taler.net>
AuthorDate: Wed Jul 6 17:06:29 2022 +0200
make XML validation unparallel
---
util/build.gradle | 2 +-
util/src/main/kotlin/XMLUtil.kt | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/util/build.gradle b/util/build.gradle
index 6f67b788..06d1d18c 100644
--- a/util/build.gradle
+++ b/util/build.gradle
@@ -36,7 +36,7 @@ dependencies {
implementation 'ch.qos.logback:logback-classic:1.2.5'
// XML Stuff
- implementation "javax.xml.bind:jaxb-api:2.3.0"
+ implementation "javax.xml.bind:jaxb-api:2.3.1"
implementation "org.glassfish.jaxb:jaxb-runtime:2.3.1"
implementation 'org.apache.santuario:xmlsec:2.2.2'
diff --git a/util/src/main/kotlin/XMLUtil.kt b/util/src/main/kotlin/XMLUtil.kt
index 5f6baffa..1fa993dc 100644
--- a/util/src/main/kotlin/XMLUtil.kt
+++ b/util/src/main/kotlin/XMLUtil.kt
@@ -248,7 +248,7 @@ class XMLUtil private constructor() {
* @param xmlDoc the XML document to validate
* @return true when validation passes, false otherwise
*/
- fun validate(xmlDoc: StreamSource): Boolean {
+ @Synchronized fun validate(xmlDoc: StreamSource): Boolean {
try {
getEbicsValidator().validate(xmlDoc)
} catch (e: Exception) {
@@ -264,7 +264,7 @@ class XMLUtil private constructor() {
* @param domDocument DOM to validate
* @return true/false if the document is valid/invalid
*/
- fun validateFromDom(domDocument: Document): Boolean {
+ @Synchronized fun validateFromDom(domDocument: Document): Boolean {
try {
getEbicsValidator().validate(DOMSource(domDocument))
} catch (e: SAXException) {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.