TestParseErrors.java revision 1465:b52a38d4536c
150276Speter/* 2166124Srafan * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 350276Speter * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 450276Speter * 550276Speter * This code is free software; you can redistribute it and/or modify it 650276Speter * under the terms of the GNU General Public License version 2 only, as 750276Speter * published by the Free Software Foundation. 850276Speter * 950276Speter * This code is distributed in the hope that it will be useful, but WITHOUT 1050276Speter * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1150276Speter * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1250276Speter * version 2 for more details (a copy is included in the LICENSE file that 1350276Speter * accompanied this code). 1450276Speter * 1550276Speter * You should have received a copy of the GNU General Public License version 1650276Speter * 2 along with this work; if not, write to the Free Software Foundation, 1750276Speter * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1850276Speter * 1950276Speter * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2050276Speter * or visit www.oracle.com if you need additional information or have any 2150276Speter * questions. 2250276Speter */ 2350276Speter 2450276Speter/* 2550276Speter * @test 2650276Speter * @bug 6988407 2750276Speter * @summary javac crashes running processor on errant code; it used to print error message 2850276Speter * @library /tools/javac/lib 2950276Speter * @build JavacTestingAbstractProcessor TestParseErrors 3050276Speter * @compile/fail/ref=TestParseErrors.out -XDrawDiagnostics -proc:only -processor TestParseErrors ParseErrors.java 3150276Speter */ 3250276Speter 3350276Speterimport java.util.*; 3450276Speterimport javax.annotation.processing.*; 3550276Speterimport javax.lang.model.element.*; 3650276Speter 3750276Speterpublic class TestParseErrors extends JavacTestingAbstractProcessor { 3850276Speter 39166124Srafan public boolean process(Set<? extends TypeElement> annotations, 4050276Speter RoundEnvironment roundEnvironment) { 4176726Speter throw new Error("Should not be called"); 42166124Srafan } 4350276Speter} 4462449Speter