mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Fixed resource leak from never closing the JarFile.
This commit is contained in:
parent
1073954550
commit
bc58aff362
@ -53,6 +53,7 @@ public class SpoutStuff {
|
|||||||
JarEntry entry = jar.getJarEntry("resources/" + theFileName);
|
JarEntry entry = jar.getJarEntry("resources/" + theFileName);
|
||||||
InputStream is = jar.getInputStream(entry);
|
InputStream is = jar.getInputStream(entry);
|
||||||
|
|
||||||
|
|
||||||
byte[] buf = new byte[2048];
|
byte[] buf = new byte[2048];
|
||||||
int nbRead;
|
int nbRead;
|
||||||
|
|
||||||
@ -64,6 +65,7 @@ public class SpoutStuff {
|
|||||||
|
|
||||||
os.flush();
|
os.flush();
|
||||||
os.close();
|
os.close();
|
||||||
|
jar.close();
|
||||||
}
|
}
|
||||||
catch (FileNotFoundException e) {
|
catch (FileNotFoundException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Loading…
Reference in New Issue
Block a user