mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-19 09:54:49 -04:00
fixed a file descriptor leak
This commit is contained in:
parent
23c096a179
commit
12ddec9a7b
@ -51,7 +51,10 @@ public class JarComponentManager implements ComponentManager, Iterable<JarCompon
|
||||
* @throws InvalidNodeException InvalidNodeException
|
||||
*/
|
||||
public void loadJar(File file) throws IOException, InvalidNodeException {
|
||||
Manifest manifest = new JarFile(file).getManifest();
|
||||
Manifest manifest;
|
||||
try (JarFile jarFile = new JarFile(file)) {
|
||||
manifest = jarFile.getManifest();
|
||||
}
|
||||
if (manifest == null)
|
||||
throw new IOException(Lang.get("err_noManifestFound"));
|
||||
Attributes attr = manifest.getMainAttributes();
|
||||
|
Loading…
x
Reference in New Issue
Block a user