langtools/test/tools/javac/IncorrectInheritance/IncorrectInheritanceTest.java
changeset 36778 e04318f39f92
parent 36526 3b41f1c69604
equal deleted inserted replaced
36777:28d33fb9097f 36778:e04318f39f92
     1 /*
     1 /*
     2  * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    25  * @test
    25  * @test
    26  * @bug 8034924
    26  * @bug 8034924
    27  * @summary Incorrect inheritance of inaccessible static method
    27  * @summary Incorrect inheritance of inaccessible static method
    28  * @library /tools/lib
    28  * @library /tools/lib
    29  * @modules jdk.compiler/com.sun.tools.javac.api
    29  * @modules jdk.compiler/com.sun.tools.javac.api
    30  *          jdk.compiler/com.sun.tools.javac.file
       
    31  *          jdk.compiler/com.sun.tools.javac.main
    30  *          jdk.compiler/com.sun.tools.javac.main
    32  *          jdk.jdeps/com.sun.tools.javap
    31  *          jdk.jdeps/com.sun.tools.javap
    33  * @build ToolBox
    32  * @build toolbox.ToolBox toolbox.JavacTask
    34  * @run main IncorrectInheritanceTest
    33  * @run main IncorrectInheritanceTest
    35  */
    34  */
       
    35 
       
    36 import toolbox.JavacTask;
       
    37 import toolbox.ToolBox;
    36 
    38 
    37 public class IncorrectInheritanceTest {
    39 public class IncorrectInheritanceTest {
    38     private static final String ASrc =
    40     private static final String ASrc =
    39             "package pkg;\n" +
    41             "package pkg;\n" +
    40             "\n" +
    42             "\n" +
    63     }
    65     }
    64 
    66 
    65     public void test() throws Exception {
    67     public void test() throws Exception {
    66         ToolBox tb = new ToolBox();
    68         ToolBox tb = new ToolBox();
    67 
    69 
    68         tb.new JavacTask()
    70         new JavacTask(tb)
    69                 .sources(ASrc, BSrc, CSrc)
    71                 .sources(ASrc, BSrc, CSrc)
    70                 .run();
    72                 .run();
    71     }
    73     }
    72 
    74 
    73 }
    75 }