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