commit 0509329ec0a60412089f91b358fbecd9af94976e parent 969796cb5986371a275aafa447bc7c6ec78e22b0 Author: Marcello Stanisci <stanisci.m@gmail.com> Date: Mon, 7 Oct 2019 13:29:31 +0200 fix condition Diffstat:
| M | src/main/kotlin/tech/libeufin/XML.kt | | | 10 | +++++++++- |
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/main/kotlin/tech/libeufin/XML.kt b/src/main/kotlin/tech/libeufin/XML.kt @@ -54,7 +54,8 @@ class XML { private val bundle = { val classLoader = ClassLoader.getSystemClassLoader() val schemas = arrayOf( - StreamSource(classLoader.getResourceAsStream("ebics_hev.xsd")) + StreamSource(classLoader.getResourceAsStream("ebics_hev.xsd")), + StreamSource(classLoader.getResourceAsStream("ebics_keymgmt_request_H004.xsd")) ) try { @@ -68,6 +69,13 @@ class XML { private val validator = bundle?.newValidator() /** + * True if the object didn't initialize + */ + fun isNull(): Boolean { + return (validator == null) || (bundle == null) + } + + /** * Parse string into XML DOM. * @param xmlString the string to parse. * @return the DOM representing @a xmlString