Skip to content

Commit

Permalink
[MNG-7212] Prefer use of InheritableThreadLocal to fix possible issue…
Browse files Browse the repository at this point in the history
… when mojo starts a thread and tries to access some artifacts

Signed-off-by: Olivier Lamy <olamy@apache.org>

This closes #521
  • Loading branch information
olamy authored and michael-o committed Aug 12, 2021
1 parent 5acdfb6 commit 48c5d93
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ public class MavenProject

private Artifact artifact;

private final ThreadLocal<ArtifactsHolder> threadLocalArtifactsHolder =
ThreadLocal.withInitial( ArtifactsHolder::new );
private final InheritableThreadLocal<ArtifactsHolder> threadLocalArtifactsHolder =
InheritableThreadLocal.withInitial( ArtifactsHolder::new );

private Model originalModel;

Expand Down

0 comments on commit 48c5d93

Please sign in to comment.