groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Belostotskiy <>
Subject GroovyDoc classloader issue
Date Tue, 19 Feb 2019 15:23:58 GMT
<div xmlns="">Hello,</div><div xmlns=""> </div><div
xmlns="">We're generating groovydocs in runtime in our app.
We use groovydoc as a library, not standalone tool.</div><div xmlns=""> </div><div
xmlns="">It mostly works, but we're experiencing issues with
some classes ending up unresolved. I found out that this happens because <span style="font-family:courier
new,monospace;">SimpleGroovyClassDoc</span> is calling its <span style="font-family:courier
new,monospace;">getClass().getClassLoader()</span> to get classloader for class resolution.
But in our case, most of classes that we want to link should be loaded via different classloader.</div><div
xmlns=""> </div><div xmlns="">Basically,
solution that would work for us, is to replace <span style="font-family:courier new,monospace;">getClass().getClassLoader()</span>
calls in <span style="font-family:courier new,monospace;">SimpleGroovyClassDoc</span>
with <span style="font-family:courier new,monospace;">Thread.currentThread().getContextClassLoader()</span>,
but that might be a breaking change.</div><div xmlns=""> </div><div
xmlns="">I'm not sure what the process is for requesting such
changes and whether it's something that Groovy team is willing to implement.</div>
View raw message