Skip to content

Commit

Permalink
Fixed: Display file name in XML parsing errors
Browse files Browse the repository at this point in the history
(OFBIZ-6993)
  • Loading branch information
mthl committed Dec 7, 2019
1 parent 071a742 commit 3c9af84
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,12 @@ private static WebXml parseWebXmlFile(String webXmlFileLocation, boolean validat
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();
}
Expand Down

0 comments on commit 3c9af84

Please sign in to comment.