groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Belostotskiy <>
Subject Re: GroovyDoc classloader issue
Date Mon, 25 Feb 2019 15:19:55 GMT
<div xmlns="">Hi, did you receive the last email (with test
in attachment)? I'm not sure if it was sent properly.</div><div xmlns=""> </div><div
xmlns="">20.02.2019, 17:34, "Alexey Belostotskiy" &lt;;:</div><blockquote
xmlns="" type="cite"><div>Hi, it's kind of messy, but
I hope you'll get the idea.</div><div> </div><div>19.02.2019, 23:48,
"Paul King" &lt;<a rel="noopener noreferrer" href=""></a>&gt;:</div><blockquote
type="cite"><div>Our preference would be to have a standalone testcase that triggers
your problem. Are you in a position to create such a test?</div> <div><div>On
Wed, Feb 20, 2019 at 1:24 AM Alexey Belostotskiy &lt;<a rel="noopener noreferrer" href=""></a>&gt;
wrote:</div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div>Hello,</div><div> </div><div>We're
generating groovydocs in runtime in our app. We use groovydoc as a library, not standalone
tool.</div><div> </div><div>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> </div><div>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> </div><div>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></blockquote></div></blockquote></blockquote>
View raw message