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 Tue, 07 May 2019 09:16:12 GMT
<div>Hi,</div><div>Did you get a chance to test it?</div><div>&nbsp;</div><div>26.02.2019,
00:24, &quot;Paul King&quot; &lt;;:</div><blockquote><div>Hi
Alexey, the attachment came through. I just haven't had time to test&nbsp;it yet. Thanks!<div>&nbsp;</div><div>Cheers,
Paul.</div></div>&nbsp;<div><div>On Tue, Feb 26, 2019 at 1:20
AM Alexey Belostotskiy &lt;<a href=""></a>&gt;
wrote:</div><blockquote style="border-left-color:rgb( 204 , 204 , 204 );border-left-style:solid;border-left-width:1px;margin-bottom:0px;margin-left:0.8ex;margin-right:0px;margin-top:0px;padding-left:1ex"><div>Hi,
did you receive the last email (with test in attachment)? I'm not sure if it was sent properly.</div><div>&nbsp;</div><div>20.02.2019,
17:34, &quot;Alexey Belostotskiy&quot; &lt;<a href=""></a>&gt;:</div><blockquote><div>Hi,
it's kind of messy, but I hope you'll get the idea.</div><div>&nbsp;</div><div>19.02.2019,
23:48, &quot;Paul King&quot; &lt;<a href=""></a>&gt;:</div><blockquote><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>&nbsp;<div><div>On Wed, Feb 20,
2019 at 1:24 AM Alexey Belostotskiy &lt;<a href=""></a>&gt;
wrote:</div><blockquote style="border-left-color:rgb( 204 , 204 , 204 );border-left-style:solid;border-left-width:1px;margin-bottom:0px;margin-left:0.8ex;margin-right:0px;margin-top:0px;padding-left:1ex"><div>Hello,</div><div>&nbsp;</div><div>We're
generating groovydocs in runtime in our app. We use groovydoc as a library, not standalone
tool.</div><div>&nbsp;</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>&nbsp;</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>&nbsp;</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></blockquote></div></blockquote>
View raw message