mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-02 16:22:27 +00:00
no effective code change: add some try-with resources (#978)
* no effective code change: add some try-with resources * moved return statement outside try-with-resources, because otherwise the order changes
This commit is contained in:
1 parent
a315c7c11e
commit
ca777d7967
12 files changed
+34
-54
No files matched your search
@@ -359,9 +359,9 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
||||
List<XmEbean> mappings = new ArrayList<>();
|
||||
while (resources.hasMoreElements()) {
|
||||
URL url = resources.nextElement();
|
||||
InputStream is = url.openStream();
|
||||
mappings.add(XmlMappingReader.read(is));
|
||||
is.close();
|
||||
try (InputStream is = url.openStream()) {
|
||||
mappings.add(XmlMappingReader.read(is));
|
||||
}
|
||||
}
|
||||
|
||||
for (XmEbean mapping : mappings) {
|
||||
|
||||
Reference in new issue
Block a user