654N/A/*
698N/A * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
654N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
654N/A *
654N/A * This code is free software; you can redistribute it and/or modify it
654N/A * under the terms of the GNU General Public License version 2 only, as
654N/A * published by the Free Software Foundation.
654N/A *
654N/A * This code is distributed in the hope that it will be useful, but WITHOUT
654N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
654N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
654N/A * version 2 for more details (a copy is included in the LICENSE file that
654N/A * accompanied this code).
654N/A *
654N/A * You should have received a copy of the GNU General Public License version
654N/A * 2 along with this work; if not, write to the Free Software Foundation,
654N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
654N/A *
654N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
654N/A * or visit www.oracle.com if you need additional information or have any
654N/A * questions.
654N/A */
654N/A
654N/A/*
654N/A * @test
654N/A * @bug 6422327
698N/A * @summary JSR 199: JavaCompilerTool can compile and generate '.class' of non '.java' files
654N/A * @author Peter von der Ah\u00e9
654N/A * @library ../lib
654N/A * @build ToolTester
654N/A * @run main T6422327
654N/A */
654N/A
654N/Aimport java.io.File;
654N/A
654N/Apublic class T6422327 extends ToolTester {
654N/A void test(String... args) {
654N/A File file = new File(test_src, "T6422327.other");
654N/A try {
654N/A task = tool.getTask(null, fm, null, null, null, fm.getJavaFileObjects(file));
654N/A throw new AssertionError("Expected exception not thrown");
654N/A } catch (IllegalArgumentException e) {
654N/A System.err.println("OK, got expected exception: " + e.getLocalizedMessage());
654N/A }
654N/A }
654N/A public static void main(String... args) {
654N/A new T6422327().test(args);
654N/A }
654N/A}
654N/A