[
https://issues.apache.org/jira/browse/MNG-7402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17495106#comment-17495106
]
Christoph Läubrich commented on MNG-7402:
-----------------------------------------
This is all derived by code-review and I think its quite hard to reproduce /
check this as a lot of tccl-action haven within maven so it *might* even be
irrelevant here, but the general pattern should be as you have described that
the original TCC is restored after a certain action has taken place to not leak
classloaders if the thread is reused.
In this example, the current TCC wil be the one of the *last* Maven project
after this method is called, this does not seem correct to me as the order of
projects should not influence classlaoding.
> BuildListCalculator never detaches the classlaoder...
> -----------------------------------------------------
>
> Key: MNG-7402
> URL: https://issues.apache.org/jira/browse/MNG-7402
> Project: Maven
> Issue Type: Bug
> Reporter: Christoph Läubrich
> Priority: Major
>
> https://github.com/apache/maven/blob/6b607109d3ce045106924139e96705fe7c42172e/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuildListCalculator.java#L63
> Her there is attachToThread called but never detached. This seems to be a
> leak, at least the threads current contextclassloader is never restored.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)