test/tools/javac/staticImport/6537020/T6537020.java

Thu, 19 Dec 2013 11:38:45 -0500

author
emc
date
Thu, 19 Dec 2013 11:38:45 -0500
changeset 2414
17ce329d7bd0
parent 0
959103a6100f
permissions
-rw-r--r--

8030726: tools/javac/NoStringToLower.java fails due to enforcement no use of String.toLowerCase on non-langtools classes
Summary: Fix NoStringToLower test to only enforce ban on String.toLowerCase on langtools classes
Reviewed-by: vromero, jfranck
Contributed-by: paul.govereau@oracle.com

     1 /*
     2  * @test /nodynamiccopyright/
     3  * @bug 6537020
     4  * @summary JCK tests: a compile-time error should be given in case of ambiguously imported fields (types, methods)
     5  *
     6  * @compile/fail/ref=T6537020.out -XDrawDiagnostics T6537020.java
     7  */
     9 package p;
    11 import static p.T6537020.C.s;
    13 class T6537020 {
    15     static class A {
    16        static String s;
    17     }
    19     interface B {
    20        String s = "";
    21     }
    23     static class C extends A implements B { }
    25     Object o = s;
    26 }

mercurial