Polishing

This commit is contained in:
Sam Brannen 2020-04-21 18:47:28 +02:00
parent 31fa1569c5
commit 5721c747b2
1 changed files with 1 additions and 5 deletions

View File

@ -130,8 +130,7 @@ public abstract class PropertiesLoaderUtils {
* @throws IOException if loading failed * @throws IOException if loading failed
*/ */
public static void fillProperties(Properties props, Resource resource) throws IOException { public static void fillProperties(Properties props, Resource resource) throws IOException {
InputStream is = resource.getInputStream(); try (InputStream is = resource.getInputStream()) {
try {
String filename = resource.getFilename(); String filename = resource.getFilename();
if (filename != null && filename.endsWith(XML_FILE_EXTENSION)) { if (filename != null && filename.endsWith(XML_FILE_EXTENSION)) {
props.loadFromXML(is); props.loadFromXML(is);
@ -140,9 +139,6 @@ public abstract class PropertiesLoaderUtils {
props.load(is); props.load(is);
} }
} }
finally {
is.close();
}
} }
/** /**