Skip to content
Browse files
Improved: Use try with resources in ‘readXmlDocument’

git-svn-id: 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed Jun 29, 2019
1 parent 4d7e598 commit c5ea5d85d337cba707d5815ccc11f58e28918644
Showing with 3 additions and 4 deletions.
  1. +3 −4 framework/base/src/main/java/org/apache/ofbiz/base/util/
@@ -387,10 +387,9 @@ public static Document readXmlDocument(URL url, boolean validate)
Debug.logWarning("[UtilXml.readXmlDocument] URL was null, doing nothing", module);
return null;
InputStream is = url.openStream();
Document document = readXmlDocument(is, validate, url.toString());
return document;
try (InputStream is = url.openStream()) {
return readXmlDocument(is, validate, url.toString());

public static Document readXmlDocument(URL url, boolean validate, boolean withPosition)

0 comments on commit c5ea5d8

Please sign in to comment.