test/tools/javac/processing/errors/TestParseErrors/TestParseErrors.java

Fri, 21 Dec 2012 08:45:43 -0800

author
darcy
date
Fri, 21 Dec 2012 08:45:43 -0800
changeset 1466
b52a38d4536c
parent 711
14a707f8ce84
child 2525
2eb010b6cb22
permissions
-rw-r--r--

8005282: Use @library tag with non-relative path for javac tests
Reviewed-by: jjg

jjg@711 1 /*
jjg@711 2 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
jjg@711 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jjg@711 4 *
jjg@711 5 * This code is free software; you can redistribute it and/or modify it
jjg@711 6 * under the terms of the GNU General Public License version 2 only, as
jjg@711 7 * published by the Free Software Foundation.
jjg@711 8 *
jjg@711 9 * This code is distributed in the hope that it will be useful, but WITHOUT
jjg@711 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jjg@711 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
jjg@711 12 * version 2 for more details (a copy is included in the LICENSE file that
jjg@711 13 * accompanied this code).
jjg@711 14 *
jjg@711 15 * You should have received a copy of the GNU General Public License version
jjg@711 16 * 2 along with this work; if not, write to the Free Software Foundation,
jjg@711 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jjg@711 18 *
jjg@711 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jjg@711 20 * or visit www.oracle.com if you need additional information or have any
jjg@711 21 * questions.
jjg@711 22 */
jjg@711 23
jjg@711 24 /*
jjg@711 25 * @test
jjg@711 26 * @bug 6988407
jjg@711 27 * @summary javac crashes running processor on errant code; it used to print error message
darcy@1466 28 * @library /tools/javac/lib
jjg@711 29 * @build JavacTestingAbstractProcessor TestParseErrors
jjg@711 30 * @compile/fail/ref=TestParseErrors.out -XDrawDiagnostics -proc:only -processor TestParseErrors ParseErrors.java
jjg@711 31 */
jjg@711 32
jjg@711 33 import java.util.*;
jjg@711 34 import javax.annotation.processing.*;
jjg@711 35 import javax.lang.model.element.*;
jjg@711 36
jjg@711 37 public class TestParseErrors extends JavacTestingAbstractProcessor {
jjg@711 38
jjg@711 39 public boolean process(Set<? extends TypeElement> annotations,
jjg@711 40 RoundEnvironment roundEnvironment) {
jjg@711 41 throw new Error("Should not be called");
jjg@711 42 }
jjg@711 43 }

mercurial