1.1 --- a/src/share/classes/com/sun/tools/javac/code/Scope.java Mon May 11 13:28:14 2015 +0530 1.2 +++ b/src/share/classes/com/sun/tools/javac/code/Scope.java Fri May 29 10:15:36 2015 +0530 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1999, 2015, 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 @@ -241,12 +241,16 @@ 1.11 listeners = listeners.prepend(sl); 1.12 } 1.13 1.14 - /** Remove symbol from this scope. Used when an inner class 1.15 - * attribute tells us that the class isn't a package member. 1.16 + /** Remove symbol from this scope. 1.17 */ 1.18 - public void remove(Symbol sym) { 1.19 + public void remove(final Symbol sym) { 1.20 Assert.check(shared == 0); 1.21 - Entry e = lookup(sym.name); 1.22 + Entry e = lookup(sym.name, new Filter<Symbol>() { 1.23 + @Override 1.24 + public boolean accepts(Symbol candidate) { 1.25 + return candidate == sym; 1.26 + } 1.27 + }); 1.28 if (e.scope == null) return; 1.29 1.30 // remove e from table and shadowed list;