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

changeset 2814
380f6c17ea01
parent 2794
7c25c29a7544
child 2893
ca5783d9a597
child 3005
0353cf89ea96
equal deleted inserted replaced
2813:d94fe2d29b1e 2814:380f6c17ea01
269 269
270 /** An environment is "static" if its static level is greater than 270 /** An environment is "static" if its static level is greater than
271 * the one of its outer environment 271 * the one of its outer environment
272 */ 272 */
273 protected static boolean isStatic(Env<AttrContext> env) { 273 protected static boolean isStatic(Env<AttrContext> env) {
274 return env.info.staticLevel > env.outer.info.staticLevel; 274 return env.outer != null && env.info.staticLevel > env.outer.info.staticLevel;
275 } 275 }
276 276
277 /** An environment is an "initializer" if it is a constructor or 277 /** An environment is an "initializer" if it is a constructor or
278 * an instance initializer. 278 * an instance initializer.
279 */ 279 */

mercurial