changeset 96:eefde0421566

Merge
author tbell
date Sun, 10 Aug 2008 18:36:19 -0700
parents 7ec8d871eb8c 938a80a47670
children 4026dece07e8
files
diffstat 22 files changed, 387 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/apt/util/Bark.java	Thu Aug 07 18:03:32 2008 -0700
+++ b/src/share/classes/com/sun/tools/apt/util/Bark.java	Sun Aug 10 18:36:19 2008 -0700
@@ -87,7 +87,7 @@
         context.put(barkKey, this);
 
         // register additional resource bundle for APT messages.
-        Messages aptMessages = new Messages(Messages.getDefaultBundle());
+        Messages aptMessages = Messages.instance(context);
         aptMessages.add("com.sun.tools.apt.resources.apt");
         aptDiags = new JCDiagnostic.Factory(aptMessages, "apt");
 
--- a/src/share/classes/com/sun/tools/javac/code/Symbol.java	Thu Aug 07 18:03:32 2008 -0700
+++ b/src/share/classes/com/sun/tools/javac/code/Symbol.java	Sun Aug 10 18:36:19 2008 -0700
@@ -923,14 +923,7 @@
                 public Object call() {
                     JavaFileObject source = log.useSource(env.toplevel.sourcefile);
                     try {
-                        // In order to catch self-references, we set
-                        // the variable's declaration position to
-                        // maximal possible value, effectively marking
-                        // the variable as undefined.
-                        int pos = VarSymbol.this.pos;
-                        VarSymbol.this.pos = Position.MAXPOS;
                         Type itype = attr.attribExpr(initializer, env, type);
-                        VarSymbol.this.pos = pos;
                         if (itype.constValue() != null)
                             return attr.coerce(itype, type).constValue();
                         else
--- a/src/share/classes/com/sun/tools/javac/code/Types.java	Thu Aug 07 18:03:32 2008 -0700
+++ b/src/share/classes/com/sun/tools/javac/code/Types.java	Sun Aug 10 18:36:19 2008 -0700
@@ -305,6 +305,11 @@
         else if (t.tag == TYPEVAR) {
             return isSubtypeUnchecked(t.getUpperBound(), s, warn);
         }
+        else if (s.tag == UNDETVAR) {
+            UndetVar uv = (UndetVar)s;
+            if (uv.inst != null)
+                return isSubtypeUnchecked(t, uv.inst, warn);
+        }
         else if (!s.isRaw()) {
             Type t2 = asSuper(t, s.tsym);
             if (t2 != null && t2.isRaw()) {
--- a/src/share/classes/com/sun/tools/javac/comp/Attr.java	Thu Aug 07 18:03:32 2008 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java	Sun Aug 10 18:36:19 2008 -0700
@@ -730,9 +730,8 @@
                     // In order to catch self-references, we set the variable's
                     // declaration position to maximal possible value, effectively
                     // marking the variable as undefined.
-                    v.pos = Position.MAXPOS;
+                    initEnv.info.enclVar = v;
                     attribExpr(tree.init, initEnv, v.type);
-                    v.pos = tree.pos;
                 }
             }
             result = tree.type = v.type;
@@ -2198,18 +2197,19 @@
             // This check applies only to class and instance
             // variables.  Local variables follow different scope rules,
             // and are subject to definite assignment checking.
-            if (v.pos > tree.pos &&
+            if ((env.info.enclVar == v || v.pos > tree.pos) &&
                 v.owner.kind == TYP &&
                 canOwnInitializer(env.info.scope.owner) &&
                 v.owner == env.info.scope.owner.enclClass() &&
                 ((v.flags() & STATIC) != 0) == Resolve.isStatic(env) &&
                 (env.tree.getTag() != JCTree.ASSIGN ||
                  TreeInfo.skipParens(((JCAssign) env.tree).lhs) != tree)) {
-
+                String suffix = (env.info.enclVar == v) ?
+                                "self.ref" : "forward.ref";
                 if (!onlyWarning || isStaticEnumField(v)) {
-                    log.error(tree.pos(), "illegal.forward.ref");
+                    log.error(tree.pos(), "illegal." + suffix);
                 } else if (useBeforeDeclarationWarning) {
-                    log.warning(tree.pos(), "forward.ref", v);
+                    log.warning(tree.pos(), suffix, v);
                 }
             }
 
--- a/src/share/classes/com/sun/tools/javac/comp/AttrContext.java	Thu Aug 07 18:03:32 2008 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/AttrContext.java	Sun Aug 10 18:36:19 2008 -0700
@@ -66,6 +66,11 @@
      */
     Lint lint;
 
+    /** The variable whose initializer is being attributed
+     * useful for detecting self-references in variable initializers
+     */
+    Symbol enclVar = null;
+
     /** Duplicate this context, replacing scope field and copying all others.
      */
     AttrContext dup(Scope scope) {
@@ -77,6 +82,7 @@
         info.varArgs = varArgs;
         info.tvars = tvars;
         info.lint = lint;
+        info.enclVar = enclVar;
         return info;
     }
 
--- a/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Thu Aug 07 18:03:32 2008 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Sun Aug 10 18:36:19 2008 -0700
@@ -627,8 +627,11 @@
         tree.sym = v;
         if (tree.init != null) {
             v.flags_field |= HASINIT;
-            if ((v.flags_field & FINAL) != 0 && tree.init.getTag() != JCTree.NEWCLASS)
-                v.setLazyConstValue(initEnv(tree, env), log, attr, tree.init);
+            if ((v.flags_field & FINAL) != 0 && tree.init.getTag() != JCTree.NEWCLASS) {
+                Env<AttrContext> initEnv = getInitEnv(tree, env);
+                initEnv.info.enclVar = v;
+                v.setLazyConstValue(initEnv(tree, initEnv), log, attr, tree.init);
+            }
         }
         if (chk.checkUnique(tree.pos(), v, enclScope)) {
             chk.checkTransparentVar(tree.pos(), v, enclScope);
@@ -828,6 +831,9 @@
             // Save class environment for later member enter (2) processing.
             halfcompleted.append(env);
 
+            // Mark class as not yet attributed.
+            c.flags_field |= UNATTRIBUTED;
+
             // If this is a toplevel-class, make sure any preceding import
             // clauses have been seen.
             if (c.owner.kind == PCK) {
@@ -835,9 +841,6 @@
                 todo.append(env);
             }
 
-            // Mark class as not yet attributed.
-            c.flags_field |= UNATTRIBUTED;
-
             if (c.owner.kind == TYP)
                 c.owner.complete();
 
--- a/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Thu Aug 07 18:03:32 2008 -0700
+++ b/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Sun Aug 10 18:36:19 2008 -0700
@@ -27,6 +27,7 @@
 
 import java.io.*;
 import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.MissingResourceException;
@@ -1185,14 +1186,16 @@
          * are processed through attribute and flow before subtypes are translated.
          */
         class ScanNested extends TreeScanner {
-            Set<Env<AttrContext>> dependencies = new HashSet<Env<AttrContext>>();
+            Set<Env<AttrContext>> dependencies = new LinkedHashSet<Env<AttrContext>>();
             public void visitClassDef(JCClassDecl node) {
                 Type st = types.supertype(node.sym.type);
                 if (st.tag == TypeTags.CLASS) {
                     ClassSymbol c = st.tsym.outermostClass();
                     Env<AttrContext> stEnv = enter.getEnv(c);
-                    if (stEnv != null && env != stEnv)
-                        dependencies.add(stEnv);
+                    if (stEnv != null && env != stEnv) {
+                        if (dependencies.add(stEnv))
+                            scan(stEnv.tree);
+                    }
                 }
                 super.visitClassDef(node);
             }
@@ -1204,6 +1207,11 @@
                 flow(attribute(dep));
         }
 
+        //We need to check for error another time as more classes might
+        //have been attributed and analyzed at this stage
+        if (errorCount() > 0)
+            return;
+
         if (verboseCompilePolicy)
             log.printLines(log.noticeWriter, "[desugar " + env.enclClass.sym + "]");
 
--- a/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Thu Aug 07 18:03:32 2008 -0700
+++ b/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Sun Aug 10 18:36:19 2008 -0700
@@ -200,6 +200,10 @@
     illegal forward reference
 compiler.warn.forward.ref=\
     reference to variable ''{0}'' before it has been initialized
+compiler.err.illegal.self.ref=\
+    self-reference in initializer
+compiler.warn.self.ref=\
+    self-reference in initializer of variable ''{0}''
 compiler.err.illegal.generic.type.for.instof=\
     illegal generic type for instanceof
 compiler.err.illegal.initializer.for.type=\
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/6734819/T6734819a.java	Sun Aug 10 18:36:19 2008 -0700
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6734819
+ * @summary Javac performs flows analysis on already translated classes
+ * @author Maurizio Cimadamore
+ *
+ * @compile/ref=T6734819a.out -XDrawDiagnostics -Xlint:all -XDverboseCompilePolicy T6734819a.java
+ */
+class Y extends W {}
+class W extends Z {}
+
+class Z {
+    void m(Z z) {
+        W w = (W)z;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/6734819/T6734819a.out	Sun Aug 10 18:36:19 2008 -0700
@@ -0,0 +1,12 @@
+[attribute Y]
+[flow Y]
+[attribute W]
+[flow W]
+[attribute Z]
+[flow Z]
+[desugar Y]
+[generate code Y]
+[desugar W]
+[generate code W]
+[desugar Z]
+[generate code Z]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/6734819/T6734819b.java	Sun Aug 10 18:36:19 2008 -0700
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6734819
+ * @summary Javac performs flows analysis on already translated classes
+ * @author Maurizio Cimadamore
+ *
+ * @compile/ref=T6734819b.out -XDrawDiagnostics -Xlint:all -XDverboseCompilePolicy T6734819b.java
+ */
+class A extends B {}
+class B {
+    class C extends B {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/6734819/T6734819b.out	Sun Aug 10 18:36:19 2008 -0700
@@ -0,0 +1,9 @@
+[attribute A]
+[flow A]
+[attribute B]
+[flow B]
+[desugar A]
+[generate code A]
+[desugar B]
+[generate code B]
+[generate code B]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/6734819/T6734819c.java	Sun Aug 10 18:36:19 2008 -0700
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6734819
+ * @summary Javac performs flows analysis on already translated classes
+ * @author Maurizio Cimadamore
+ *
+ * @compile/fail/ref=T6734819c.out -XDrawDiagnostics -Xlint:all -XDverboseCompilePolicy T6734819c.java
+ */
+class Y extends W {}
+class W extends Z {}
+
+class Z {
+    void m(Z z) {
+        return;
+        W w = (W)z;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/6734819/T6734819c.out	Sun Aug 10 18:36:19 2008 -0700
@@ -0,0 +1,8 @@
+[attribute Y]
+[flow Y]
+[attribute W]
+[flow W]
+[attribute Z]
+[flow Z]
+T6734819c.java:38:11: compiler.err.unreachable.stmt
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/ForwardReference/T6676362a.java	Sun Aug 10 18:36:19 2008 -0700
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6676362
+ * @summary Spurious forward reference error with final var + instance variable initializer
+ * @author Maurizio Cimadamore
+ *
+ * @compile T6676362a.java
+ */
+
+public class T6676362a {
+    Object o = new Object() {Object m() {return o2;}};
+    final Object o2 = o;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/ForwardReference/T6676362b.java	Sun Aug 10 18:36:19 2008 -0700
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6676362
+ * @summary Spurious forward reference error with final var + instance variable initializer
+ * @author Maurizio Cimadamore
+ *
+ * @compile T6676362b.java
+ */
+
+public class T6676362b {
+    static final int i1 = T6676362b.i2; //legal - usage is not via simple name
+    static final int i2 = i1;
+}
--- a/test/tools/javac/enum/forwardRef/T6425594.out	Thu Aug 07 18:03:32 2008 -0700
+++ b/test/tools/javac/enum/forwardRef/T6425594.out	Sun Aug 10 18:36:19 2008 -0700
@@ -1,4 +1,4 @@
-T6425594.java:10:28: compiler.warn.forward.ref: x
+T6425594.java:10:28: compiler.warn.self.ref: x
 T6425594.java:11:26: compiler.err.illegal.forward.ref
 1 error
 1 warning
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/inference/6718364/T6718364.java	Sun Aug 10 18:36:19 2008 -0700
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6718364
+ * @summary inference fails when a generic method is invoked with raw arguments
+ * @compile/ref=T6718364.out -XDstdout -XDrawDiagnostics -Xlint:unchecked T6718364.java
+ */
+class T6718364 {
+    class X<T> {}
+
+    public <T> void m(X<T> x, T t) {}
+
+    public void test() {
+        m(new X<X<Integer>>(), new X());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/inference/6718364/T6718364.out	Sun Aug 10 18:36:19 2008 -0700
@@ -0,0 +1,3 @@
+T6718364.java:36:32: compiler.warn.prob.found.req: (- compiler.misc.unchecked.assign), T6718364.X, T6718364.X<java.lang.Integer>
+T6718364.java:36:10: compiler.warn.unchecked.meth.invocation.applied: <T>m(T6718364.X<T>,T), T6718364, , T6718364.X<T6718364.X<java.lang.Integer>>,T6718364.X
+2 warnings
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/staticImport/6695838/T6695838.java	Sun Aug 10 18:36:19 2008 -0700
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6695838
+ * @summary javac does not detect cyclic inheritance involving static inner classes after import clause
+ * @author Maurizio Cimadamore
+ *
+ * @compile/fail a/FooInterface.java
+ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/staticImport/6695838/a/Foo.java	Sun Aug 10 18:36:19 2008 -0700
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package a;
+
+class Foo implements FooInterface {
+    public static interface InnerInterface {}
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/staticImport/6695838/a/FooInterface.java	Sun Aug 10 18:36:19 2008 -0700
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package a;
+
+import a.Foo.InnerInterface;
+
+public interface FooInterface extends Foo.InnerInterface {}
+