mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8259224: (ann) getAnnotatedReceiverType should not parameterize owner(s) of statically nested classes
Reviewed-by: jfranck
This commit is contained in:
parent
ad45678719
commit
d25a1bed56
2 changed files with 70 additions and 1 deletions
|
@ -707,7 +707,9 @@ public abstract class Executable extends AccessibleObject
|
|||
Class<?> ownerClass = c.getDeclaringClass();
|
||||
TypeVariable<?>[] typeVars = c.getTypeParameters();
|
||||
|
||||
if (ownerClass == null) { // base case
|
||||
// base case, static nested classes, according to JLS 8.1.3, has no
|
||||
// enclosing instance, therefore its owner is not generified.
|
||||
if (ownerClass == null || Modifier.isStatic(c.getModifiers())) {
|
||||
if (typeVars.length == 0)
|
||||
return c;
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue