Octavia Togami created GROOVY-12682:
---------------------------------------
Summary: AsmDecompiler doesn't account for the resource at the URL
changing
Key: GROOVY-12682
URL: https://issues.apache.org/jira/browse/GROOVY-12682
Project: Groovy
Issue Type: Bug
Components: Compiler
Affects Versions: 6.0.0, 5.1.3, 4.0.33
Reporter: Octavia Togami
AsmDecompiler keeps a map of all provided URLs to their ClassStub, but provides
no way to "refresh" a URL if it changes (e.g. a JAR on disk gets recompiled).
This results in a minor issue if the compiler is re-used in the same JVM, as
there is no way to clear these old signatures and thus a compilation failure
occurs due to Groovy looking at old data.
This is an issue in Gradle where we do precompiled script compilation
in-process, so e.g. deleting classes and removing their references from other
files still results in NoClassDefFoundError because the references in other
files are never removed from this cache. See
https://github.com/gradle/gradle/pull/39694.
It would be nice if there was a way to clear this cache or explicitly expire
parts of it. Additionally, nothing ever cleans up the map entry when the soft
reference expires, which causes a slow small leak.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)