diff --git a/projects/Mockito/8/org/mockito/internal/util/reflection/GenericMetadataSupport.java b/projects/Mockito/8/org/mockito/internal/util/reflection/GenericMetadataSupport.java index 152e942..8046052 100644 --- a/projects/Mockito/8/org/mockito/internal/util/reflection/GenericMetadataSupport.java +++ b/projects/Mockito/8/org/mockito/internal/util/reflection/GenericMetadataSupport.java @@ -76,7 +76,7 @@ protected void registerTypeVariablesOn(Type classType) { if (actualTypeArgument instanceof WildcardType) { contextualActualTypeParameters.put(typeParameter, boundsOf((WildcardType) actualTypeArgument)); - } else { + } else if (typeParameter != actualTypeArgument) { contextualActualTypeParameters.put(typeParameter, actualTypeArgument); } // logger.log("For '" + parameterizedType + "' found type variable : { '" + typeParameter + "(" + System.identityHashCode(typeParameter) + ")" + "' : '" + actualTypeArgument + "(" + System.identityHashCode(typeParameter) + ")" + "' }");