From 10aab46ba66480a9cf775a0a325abc05d4ead959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Thu, 29 Jun 2017 21:19:43 -0300 Subject: [PATCH] Better comments for edge cases --- .../java/typeresolution/typedefinition/JavaTypeDefinition.java | 1 + 1 file changed, 1 insertion(+) diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/typedefinition/JavaTypeDefinition.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/typedefinition/JavaTypeDefinition.java index e119d55e95..2bc06b2cba 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/typedefinition/JavaTypeDefinition.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/typedefinition/JavaTypeDefinition.java @@ -27,6 +27,7 @@ public class JavaTypeDefinition implements TypeDefinition { final TypeVariable[] typeParameters; if (clazz.isAnonymousClass()) { + // the anonymous class can't have generics, but we may be bounding generics from super classes typeParameters = resolveTypeDefinition(clazz.getGenericSuperclass()).clazz.getTypeParameters(); } else { typeParameters = clazz.getTypeParameters();