[MNG-3797] RealmUtils.create*Id() does not properly separate multiple threads

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@714067 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2008-11-14 16:49:04 +00:00
parent 1f6060121d
commit 378ee24d22
1 changed files with 3 additions and 3 deletions

View File

@ -38,13 +38,13 @@ public final class RealmUtils
{
return "/extensions/" + extensionArtifact.getGroupId() + ":" + extensionArtifact.getArtifactId() + ":" +
extensionArtifact.getVersion() + "/thread:" +
Thread.currentThread().getName(); //add thread to the mix to prevent clashes in paralel execution
Thread.currentThread().getId(); //add thread to the mix to prevent clashes in parallel execution
}
public static String createProjectId( String projectGroupId, String projectArtifactId, String projectVersion )
{
return "/projects/" + projectGroupId + ":" + projectArtifactId + ":" + projectVersion + "/thread:" +
Thread.currentThread().getName(); //add thread to the mix to prevent clashes in paralel execution
Thread.currentThread().getId(); //add thread to the mix to prevent clashes in parallel execution
}
public static String createPluginRealmId( Plugin plugin )
@ -86,7 +86,7 @@ public final class RealmUtils
id.append( '@' ).append( depId.toString().hashCode() )
.append( "/thread:" ).append(
Thread.currentThread().getName() ); //add thread to the mix to prevent clashes in paralel execution
Thread.currentThread().getId() ); //add thread to the mix to prevent clashes in parallel execution
return id.toString();
}