Polishing
This commit is contained in:
parent
31fa1569c5
commit
5721c747b2
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue