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

changeset 1492
df694c775e8a
parent 1456
f20568328a57
child 1510
7873d37f5b37
     1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Attr.java	Mon Jan 14 19:52:36 2013 +0100
     1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java	Mon Jan 14 13:50:01 2013 -0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -3844,24 +3844,14 @@
    1.11                  log.error(tree.typarams.head.pos(),
    1.12                            "intf.annotation.cant.have.type.params");
    1.13  
    1.14 -            // If this annotation has a @ContainedBy, validate
    1.15 -            Attribute.Compound containedBy = c.attribute(syms.containedByType.tsym);
    1.16 -            if (containedBy != null) {
    1.17 -                // get diagnositc position for error reporting
    1.18 -                DiagnosticPosition cbPos = getDiagnosticPosition(tree, containedBy.type);
    1.19 +            // If this annotation has a @Repeatable, validate
    1.20 +            Attribute.Compound repeatable = c.attribute(syms.repeatableType.tsym);
    1.21 +            if (repeatable != null) {
    1.22 +                // get diagnostic position for error reporting
    1.23 +                DiagnosticPosition cbPos = getDiagnosticPosition(tree, repeatable.type);
    1.24                  Assert.checkNonNull(cbPos);
    1.25  
    1.26 -                chk.validateContainedBy(c, containedBy, cbPos);
    1.27 -            }
    1.28 -
    1.29 -            // If this annotation has a @ContainerFor, validate
    1.30 -            Attribute.Compound containerFor = c.attribute(syms.containerForType.tsym);
    1.31 -            if (containerFor != null) {
    1.32 -                // get diagnositc position for error reporting
    1.33 -                DiagnosticPosition cfPos = getDiagnosticPosition(tree, containerFor.type);
    1.34 -                Assert.checkNonNull(cfPos);
    1.35 -
    1.36 -                chk.validateContainerFor(c, containerFor, cfPos);
    1.37 +                chk.validateRepeatable(c, repeatable, cbPos);
    1.38              }
    1.39          } else {
    1.40              // Check that all extended classes and interfaces

mercurial