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

changeset 2136
7f6481e5fe3a
parent 2134
b0c086cd4520
child 2149
e5d3cd43c85e
     1.1 --- a/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java	Wed Oct 16 10:47:21 2013 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java	Wed Oct 16 16:33:04 2013 -0400
     1.3 @@ -97,7 +97,6 @@
     1.4      final Symtab syms;
     1.5      final Annotate annotate;
     1.6      final Attr attr;
     1.7 -    private final boolean typeAnnoAsserts;
     1.8  
     1.9      protected TypeAnnotations(Context context) {
    1.10          context.put(typeAnnosKey, this);
    1.11 @@ -107,7 +106,6 @@
    1.12          annotate = Annotate.instance(context);
    1.13          attr = Attr.instance(context);
    1.14          Options options = Options.instance(context);
    1.15 -        typeAnnoAsserts = options.isSet("TypeAnnotationAsserts");
    1.16      }
    1.17  
    1.18      /**
    1.19 @@ -1042,11 +1040,7 @@
    1.20          @Override
    1.21          public void visitMethodDef(final JCMethodDecl tree) {
    1.22              if (tree.sym == null) {
    1.23 -                if (typeAnnoAsserts) {
    1.24 -                    Assert.error("Visiting tree node before memberEnter");
    1.25 -                } else {
    1.26 -                return;
    1.27 -            }
    1.28 +                Assert.error("Visiting tree node before memberEnter");
    1.29              }
    1.30              if (sigOnly) {
    1.31                  if (!tree.mods.annotations.isEmpty()) {
    1.32 @@ -1150,10 +1144,7 @@
    1.33                  // Nothing to do for separateAnnotationsKinds if
    1.34                  // there are no annotations of either kind.
    1.35              } else if (tree.sym == null) {
    1.36 -                if (typeAnnoAsserts) {
    1.37 -                    Assert.error("Visiting tree node before memberEnter");
    1.38 -                }
    1.39 -                // Something is wrong already. Quietly ignore.
    1.40 +                Assert.error("Visiting tree node before memberEnter");
    1.41              } else if (tree.sym.getKind() == ElementKind.PARAMETER) {
    1.42                  // Parameters are handled in visitMethodDef or visitLambda.
    1.43              } else if (tree.sym.getKind() == ElementKind.FIELD) {

mercurial