/* * Copyright (c) 2010, 2015, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions.
*/
/** * @test * @bug 6956638 * @summary JavacTask.generate does not generate all required files * @modules jdk.compiler
*/ publicclass T6956638 { publicstaticvoid main(String[] args) throws Exception { new T6956638().run();
}
void run() throws Exception {
File srcDir = new File("src");
File[] files = {
writeFile(new File(srcDir, "T1.java"), "public class T1 extends T2 {}\n"),
writeFile(new File(srcDir, "T2.java"), "public class T2 extends T3 {}\n"),
writeFile(new File(srcDir, "T3.java"), "public class T3 { public static final int C = 1; }\n"),
writeFile(new File(srcDir, "Test.java"), "public class Test { public static final int D = T1.C; }\n")
};
for (File f1: files) { for (File f2: files) { if (f2 == f1) continue; for (File f3: files) { if (f3 == f2 || f3 == f1) continue; for (File f4: files) { if (f4 == f3 || f4 == f2 || f4 == f1) continue; try {
test(f1, f2, f3, f4);
} catch (Exception e) {
error(e);
}
}
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.