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

Fix #72 #73

Closed
wants to merge 2 commits into from
Closed

Fix #72 #73

wants to merge 2 commits into from

Conversation

tdegueul
Copy link
Collaborator

This is a Windows-only issue:

  • JARs loaded by an URLClassLoader are kept open indefinitely until the classloader is explicitly .close() or the JVM dies
  • So the JARs we analyze to build Spoon references from the JApiCmp delta model are kept open and cannot be deleted until the JVM dies (e.g., those used in Maracas.computeDelta(v1, v2))

The current dirty workaround is to keep a reference to the classloader we pass to Spoon until we're done computing Spoon references for the delta model, and then explicitly close() it. The current fix may affect the impact analysis: at the time we're computing the impact model, the JARs are now closed, so if we try to access some references that haven't been accessed before, they may fail.

  - Keep the JARs open in the URLClassLoader until we're done with
    building our delta model
  - Then, explicitly cl.close() it when appropriate (???) to release the
    JARs
@tdegueul tdegueul added the bug Something isn't working label Aug 25, 2022
@tdegueul tdegueul self-assigned this Aug 25, 2022
@tdegueul tdegueul linked an issue Aug 25, 2022 that may be closed by this pull request
@tdegueul
Copy link
Collaborator Author

tdegueul commented Mar 8, 2023

WONTFIX

@tdegueul tdegueul closed this Mar 8, 2023
@tdegueul tdegueul deleted the release-spoon-classloader branch March 8, 2023 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Libraries' JARs cannot be deleted after Maracas computes Delta
1 participant