src/share/classes/com/sun/tools/javac/code/AnnoConstruct.java

changeset 2154
ac839d6f4953
parent 2100
1e7ad879f15e
child 2156
f003f09144ff
     1.1 --- a/src/share/classes/com/sun/tools/javac/code/AnnoConstruct.java	Mon Oct 21 15:37:11 2013 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/javac/code/AnnoConstruct.java	Tue Oct 22 03:36:44 2013 +0200
     1.3 @@ -25,6 +25,7 @@
     1.4  package com.sun.tools.javac.code;
     1.5  
     1.6  import java.lang.annotation.Annotation;
     1.7 +import java.lang.annotation.Inherited;
     1.8  import java.lang.reflect.InvocationTargetException;
     1.9  import java.lang.reflect.Method;
    1.10  
    1.11 @@ -112,7 +113,8 @@
    1.12          }
    1.13  
    1.14          // Deal with inherited annotations
    1.15 -        if (direct == null && container == null)
    1.16 +        if (direct == null && container == null &&
    1.17 +                annoType.isAnnotationPresent(Inherited.class))
    1.18              return getInheritedAnnotations(annoType);
    1.19  
    1.20          // Pack them in an array

mercurial