Polishing
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user