[
https://issues.apache.org/jira/browse/MNG-7402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17495108#comment-17495108
]
Christoph Läubrich commented on MNG-7402:
-----------------------------------------
Maybe in BuildListCalculatorTest.testCalculateProjectBuilds() one could add a
check that the original classlaoder is restored afterwards.... Also
LifecycleTaskSegmentCalculatorImplTest.testCalculateProjectBuilds() call the
method and could be a place to check that the TCC is restored correctly.
Beside that the code is called in
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(MavenSession)
where after the call the current TCC is passed to another call as the
"original" classlaoder.
> 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)