This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch release18.12
in repository
https://gitbox.apache.org/repos/asf/ofbiz-framework.gitThe following commit(s) were added to refs/heads/release18.12 by this push:
new 8d978b2 Fixed: Display file name in XML parsing errors (OFBIZ-6993)
8d978b2 is described below
commit 8d978b260195a81d338f9d423861e707faed647b
Author: Mathieu Lirzin <
[hidden email]>
AuthorDate: Sat Dec 7 22:25:09 2019 +0100
Fixed: Display file name in XML parsing errors
(OFBIZ-6993)
---
.../webapp/src/main/java/org/apache/ofbiz/webapp/WebAppUtil.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/WebAppUtil.java b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/WebAppUtil.java
index 184d610..ccd146b 100644
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/WebAppUtil.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/WebAppUtil.java
@@ -253,11 +253,12 @@ public final class WebAppUtil {
LocalResolver lr = new LocalResolver(new DefaultHandler());
ErrorHandler handler = new LocalErrorHandler(webXmlFileLocation, lr);
Digester digester = DigesterFactory.newDigester(validate, namespaceAware, new WebRuleSet(), false);
- digester.getParser();
digester.push(result);
digester.setErrorHandler(handler);
try (InputStream is = new FileInputStream(file)) {
- digester.parse(new InputSource(is));
+ InputSource iso = new InputSource(is);
+ iso.setSystemId(file.getAbsolutePath());
+ digester.parse(iso);
} finally {
digester.reset();
}