1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Attr.java Wed Jun 18 12:30:29 2014 -0400 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java Wed Jun 18 12:06:50 2014 -0400 1.3 @@ -94,6 +94,7 @@ 1.4 final Annotate annotate; 1.5 final TypeAnnotations typeAnnotations; 1.6 final DeferredLintHandler deferredLintHandler; 1.7 + final TypeEnvs typeEnvs; 1.8 1.9 public static Attr instance(Context context) { 1.10 Attr instance = context.get(attrKey); 1.11 @@ -123,6 +124,7 @@ 1.12 annotate = Annotate.instance(context); 1.13 typeAnnotations = TypeAnnotations.instance(context); 1.14 deferredLintHandler = DeferredLintHandler.instance(context); 1.15 + typeEnvs = TypeEnvs.instance(context); 1.16 1.17 Options options = Options.instance(context); 1.18 1.19 @@ -432,7 +434,7 @@ 1.20 } 1.21 1.22 public Type attribType(JCTree node, TypeSymbol sym) { 1.23 - Env<AttrContext> env = enter.typeEnvs.get(sym); 1.24 + Env<AttrContext> env = typeEnvs.get(sym); 1.25 Env<AttrContext> localEnv = env.dup(node, env.info.dup()); 1.26 return attribTree(node, localEnv, unknownTypeInfo); 1.27 } 1.28 @@ -4051,7 +4053,7 @@ 1.29 // ... and attribute the bound class 1.30 c.flags_field |= UNATTRIBUTED; 1.31 Env<AttrContext> cenv = enter.classEnv(cd, env); 1.32 - enter.typeEnvs.put(c, cenv); 1.33 + typeEnvs.put(c, cenv); 1.34 attribClass(c); 1.35 return owntype; 1.36 } 1.37 @@ -4201,9 +4203,9 @@ 1.38 c.flags_field &= ~UNATTRIBUTED; 1.39 1.40 // Get environment current at the point of class definition. 1.41 - Env<AttrContext> env = enter.typeEnvs.get(c); 1.42 - 1.43 - // The info.lint field in the envs stored in enter.typeEnvs is deliberately uninitialized, 1.44 + Env<AttrContext> env = typeEnvs.get(c); 1.45 + 1.46 + // The info.lint field in the envs stored in typeEnvs is deliberately uninitialized, 1.47 // because the annotations were not available at the time the env was created. Therefore, 1.48 // we look up the environment chain for the first enclosing environment for which the 1.49 // lint value is set. Typically, this is the parent env, but might be further if there