Skip to content
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

Classloaders not being closed for mojo classloaders #188

Closed
cwholmes opened this issue Dec 18, 2019 · 2 comments · Fixed by #353
Closed

Classloaders not being closed for mojo classloaders #188

cwholmes opened this issue Dec 18, 2019 · 2 comments · Fixed by #353
Assignees
Milestone

Comments

@cwholmes
Copy link

This classloader is a URLClassloader which does not get closed and is therefore relying on the finalizer to close all open file handles. This is a problem for long running maven processes for large projects.

This should probably be modified to be closed as the finalize method and the finalizer has been deprecated for possible future removal as of jdk9.

https://github.com/highsource/maven-jaxb2-plugin/blob/master/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/RawXJC2Mojo.java#L312

@laurentschoelens
Copy link
Collaborator

laurentschoelens commented Jul 6, 2023

New file location
https://github.com/highsource/jaxb-tools/blob/master/maven-plugin/plugin-core/src/main/java/org/jvnet/jaxb/maven/RawXJC2Mojo.java#L314

We'll look if introducing .close method in finally block will not break anything

@laurentschoelens
Copy link
Collaborator

@cwholmes
This will be fixed in 2.0.6 release

@mattrpav mattrpav modified the milestones: 2.0.6, 2.0.7 Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants