Skip to content

Commit

Permalink
Patch JGit FS class to prevent classloader memory leak (#2544)
Browse files Browse the repository at this point in the history
When using the rewrite-gradle-plugin, JGit's FS class adds a Runtime shutdown hook that inadvertently creates a shadow reference to the RewriteClassLoader of the plugin's classpath isolation feature. This expands to effectively mean that each time the rewrite configuration is modified and a new RewriteClassLoader is created, the previous one is leaked on the heap without ever being able to be reclaimed by the garbage collector. The included patch here removes just the shutdown hook, so that we can stop leaking the classloader
  • Loading branch information
shanman190 authored Dec 17, 2022
1 parent 5ac808b commit 2120ad1
Showing 1 changed file with 2,541 additions and 0 deletions.
Loading

0 comments on commit 2120ad1

Please sign in to comment.