Skip to content

Commit

Permalink
WELD-562
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas committed Jul 19, 2010
1 parent 3d89eb1 commit dd7e444
Showing 1 changed file with 10 additions and 3 deletions.
Expand Up @@ -106,9 +106,16 @@ else if (contextuals.containsKey(contextual))
}
else
{
String id = new StringBuilder().append(GENERATED_ID_PREFIX).append(idGenerator.incrementAndGet()).toString();
contextuals.put(contextual, id);
return id;
synchronized (contextual)
{
if (contextuals.containsKey(contextual))
{
return contextuals.get(contextual);
}
String id = new StringBuilder().append(GENERATED_ID_PREFIX).append(idGenerator.incrementAndGet()).toString();
contextuals.put(contextual, id);
return id;
}
}
}

Expand Down

0 comments on commit dd7e444

Please sign in to comment.