Skip to content

Commit

Permalink
Update spock-core/src/main/java/org/spockframework/mock/runtime/ByteB…
Browse files Browse the repository at this point in the history
…uddyMockFactory.java

Co-authored-by: Björn Kautler <Bjoern@Kautler.net>
  • Loading branch information
AndreasTu and Vampire committed Sep 4, 2023
1 parent bbe3a83 commit c84f558
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -62,10 +62,10 @@ class ByteBuddyMockFactory {
* This array contains {@link TypeCachingLock} instances, which are used as java monitor locks for
* {@link TypeCache#findOrInsert(ClassLoader, Object, Callable, Object)}.
* The {@code cacheLocks} spreads the lock to acquire over multiple locks instead of using a single lock
* {@code CACHE} for all {@code TypeCache.SimpleKeys}.
* {@code CACHE} for all {@link TypeCache.SimpleKey}s.
*
* <p>Note: We can't simply use the mockedType class lock as a lock,
* because the {@link TypeCache.SimpleKey}, will be the same for different {@code mockTypes + additionalInterfaces}.
* because the {@code TypeCache.SimpleKey}, will be the same for different {@code mockTypes + additionalInterfaces}.
* See the {@code hashCode} implementation of the {@code TypeCache.SimpleKey}, which has {@code Set} semantics.
*/
private final TypeCachingLock[] cacheLocks;
Expand Down

0 comments on commit c84f558

Please sign in to comment.