src/share/classes/com/sun/tools/javac/comp/Check.java

changeset 2168
119747cd9f25
parent 2157
963c57175e40
child 2187
4788eb38cac5
     1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Check.java	Wed Oct 23 23:20:32 2013 -0400
     1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Check.java	Thu Oct 24 01:27:10 2013 -0400
     1.3 @@ -3011,7 +3011,6 @@
     1.4      boolean annotationApplicable(JCAnnotation a, Symbol s) {
     1.5          Attribute.Array arr = getAttributeTargetAttribute(a.annotationType.type.tsym);
     1.6          Name[] targets;
     1.7 -
     1.8          if (arr == null) {
     1.9              targets = defaultTargetMetaInfo(a, s);
    1.10          } else {
    1.11 @@ -3028,7 +3027,7 @@
    1.12          }
    1.13          for (Name target : targets) {
    1.14              if (target == names.TYPE)
    1.15 -                { if (s.kind == TYP) return true; }
    1.16 +                { if (s.kind == TYP && !s.isAnonymous()) return true; }
    1.17              else if (target == names.FIELD)
    1.18                  { if (s.kind == VAR && s.owner.kind != MTH) return true; }
    1.19              else if (target == names.METHOD)

mercurial