-
-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
close JarFile stream after getManifest #197
Conversation
@@ -51,8 +51,8 @@ public PluginDescriptor find(Path pluginPath) throws PluginException { | |||
|
|||
protected Manifest readManifest(Path pluginPath) throws PluginException { | |||
if (FileUtils.isJarFile(pluginPath)) { | |||
try { | |||
Manifest manifest = new JarFile(pluginPath.toFile()).getManifest(); | |||
try(JarFile jar = new JarFile(pluginPath.toFile())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
@HeartUnchange I think that it's a good idea to submit the fix for |
I am sorry. I didn't notice the unloadPlugin method. Just change |
Thanks! |
According to the Plugin lifecycle, a plugin stopped should be able to be removed. But it couldn't. Threre still is some stream opened.
One is in the PluginDescriptor, the other is the URLClassLoader.