diff -r aa6c6f8b5622 -r f7f271bd74a2 src/share/classes/com/sun/tools/javac/code/Scope.java --- a/src/share/classes/com/sun/tools/javac/code/Scope.java Sat Aug 10 16:29:26 2013 +0100 +++ b/src/share/classes/com/sun/tools/javac/code/Scope.java Mon Aug 12 17:25:07 2013 +0100 @@ -199,7 +199,7 @@ } public void enter(Symbol sym, Scope s) { - enter(sym, s, s); + enter(sym, s, s, false); } /** @@ -207,7 +207,7 @@ * given scope `s' accessed through `origin'. The last two * arguments are only used in import scopes. */ - public void enter(Symbol sym, Scope s, Scope origin) { + public void enter(Symbol sym, Scope s, Scope origin, boolean staticallyImported) { Assert.check(shared == 0); if (nelems * 3 >= hashMask * 2) dble(); @@ -217,7 +217,7 @@ old = sentinel; nelems++; } - Entry e = makeEntry(sym, old, elems, s, origin); + Entry e = makeEntry(sym, old, elems, s, origin, staticallyImported); table[hash] = e; elems = e; @@ -227,7 +227,7 @@ } } - Entry makeEntry(Symbol sym, Entry shadowed, Entry sibling, Scope scope, Scope origin) { + Entry makeEntry(Symbol sym, Entry shadowed, Entry sibling, Scope scope, Scope origin, boolean staticallyImported) { return new Entry(sym, shadowed, sibling, scope); } @@ -499,6 +499,10 @@ else return shadowed.next(sf); } + public boolean isStaticallyImported() { + return false; + } + public Scope getOrigin() { // The origin is only recorded for import scopes. For all // other scope entries, the "enclosing" type is available @@ -517,20 +521,19 @@ } @Override - Entry makeEntry(Symbol sym, Entry shadowed, Entry sibling, Scope scope, Scope origin) { - return new ImportEntry(sym, shadowed, sibling, scope, origin); - } + Entry makeEntry(Symbol sym, Entry shadowed, Entry sibling, Scope scope, + final Scope origin, final boolean staticallyImported) { + return new Entry(sym, shadowed, sibling, scope) { + @Override + public Scope getOrigin() { + return origin; + } - static class ImportEntry extends Entry { - private Scope origin; - - ImportEntry(Symbol sym, Entry shadowed, Entry sibling, Scope scope, Scope origin) { - super(sym, shadowed, sibling, scope); - this.origin = origin; - } - - @Override - public Scope getOrigin() { return origin; } + @Override + public boolean isStaticallyImported() { + return staticallyImported; + } + }; } } @@ -724,7 +727,7 @@ } @Override - public void enter(Symbol sym, Scope s, Scope origin) { + public void enter(Symbol sym, Scope s, Scope origin, boolean staticallyImported) { throw new UnsupportedOperationException(); }