langtools/test/tools/javac/T8022162/IncorrectSignatureDeterminationForInnerClassesTest.java
changeset 36778 e04318f39f92
parent 36526 3b41f1c69604
equal deleted inserted replaced
36777:28d33fb9097f 36778:e04318f39f92
     1 /*
     1 /*
     2  * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2013, 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 8022162
    26  * @bug 8022162
    27  * @summary Incorrect signature determination for certain inner class generics
    27  * @summary Incorrect signature determination for certain inner class generics
    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 IncorrectSignatureDeterminationForInnerClassesTest
    33  * @run main IncorrectSignatureDeterminationForInnerClassesTest
    35  */
    34  */
       
    35 
       
    36 import toolbox.JavacTask;
       
    37 import toolbox.ToolBox;
    36 
    38 
    37 public class IncorrectSignatureDeterminationForInnerClassesTest {
    39 public class IncorrectSignatureDeterminationForInnerClassesTest {
    38 
    40 
    39     private static final String DSrc =
    41     private static final String DSrc =
    40         "package p1;\n" +
    42         "package p1;\n" +
    71 
    73 
    72     void compile() throws Exception {
    74     void compile() throws Exception {
    73         ToolBox tb = new ToolBox();
    75         ToolBox tb = new ToolBox();
    74         tb.createDirectories("classes");
    76         tb.createDirectories("classes");
    75 
    77 
    76         tb.new JavacTask()
    78         new JavacTask(tb)
    77                 .outdir("classes")
    79                 .outdir("classes")
    78                 .sources(DSrc)
    80                 .sources(DSrc)
    79                 .run();
    81                 .run();
    80 
    82 
    81         // compile class H against the class files for classes D and Q
    83         // compile class H against the class files for classes D and Q
    82         tb.new JavacTask()
    84         new JavacTask(tb)
    83                 .outdir("classes")
    85                 .outdir("classes")
    84                 .classpath("classes")
    86                 .classpath("classes")
    85                 .sources(HSrc)
    87                 .sources(HSrc)
    86                 .run();
    88                 .run();
    87     }
    89     }