Slackbot
02/18/2024, 10:53 PMVampire
02/18/2024, 11:56 PMwithDebug(true)
in a pretty subtle manner.
withDebug(true)
causes the test and thus Gradle run to be done in-process.
When the test run is finished, the class loader on which the JGit classes reside gets closed as it should not be necessary anymore.
The problem is, that JGit registers a shutdown hook that wants to do some cleanup.
When these cleanup actions are run, classes that were not loaded before are needed (NLS
in your stacktrace, JGitText
when I try to execute it here). But as the class loader is closed already, the JarFile instances are closed already and thus the so-far unloaded class cannot be loaded from the jar file and get that exception after the test was actually successful already.
I don't think you can do much about it besides making sure the classes that are needed get loaded before the class loader is closed.Caleb Cushing
02/19/2024, 1:42 PM