test/tools/javac/processing/T7196462.java

Mon, 24 Sep 2012 14:04:34 -0700

author
jjg
date
Mon, 24 Sep 2012 14:04:34 -0700
changeset 1334
8987971bcb45
child 1466
b52a38d4536c
permissions
-rw-r--r--

7196462: JavacProcessingEnvironment should tolerate BasicJavacTask
Reviewed-by: mcimadamore

jjg@1334 1 /*
jjg@1334 2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
jjg@1334 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jjg@1334 4 *
jjg@1334 5 * This code is free software; you can redistribute it and/or modify it
jjg@1334 6 * under the terms of the GNU General Public License version 2 only, as
jjg@1334 7 * published by the Free Software Foundation.
jjg@1334 8 *
jjg@1334 9 * This code is distributed in the hope that it will be useful, but WITHOUT
jjg@1334 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jjg@1334 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
jjg@1334 12 * version 2 for more details (a copy is included in the LICENSE file that
jjg@1334 13 * accompanied this code).
jjg@1334 14 *
jjg@1334 15 * You should have received a copy of the GNU General Public License version
jjg@1334 16 * 2 along with this work; if not, write to the Free Software Foundation,
jjg@1334 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jjg@1334 18 *
jjg@1334 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jjg@1334 20 * or visit www.oracle.com if you need additional information or have any
jjg@1334 21 * questions.
jjg@1334 22 */
jjg@1334 23
jjg@1334 24 /*
jjg@1334 25 * @test
jjg@1334 26 * @bug 7196462
jjg@1334 27 * @summary JavacProcessingEnvironment should tolerate BasicJavacTask
jjg@1334 28 * @library ../lib
jjg@1334 29 * @build JavacTestingAbstractProcessor T7196462
jjg@1334 30 * @compile/process -processor T7196462 T7196462.java
jjg@1334 31 */
jjg@1334 32
jjg@1334 33 import java.util.*;
jjg@1334 34 import javax.annotation.processing.*;
jjg@1334 35 import javax.lang.model.element.*;
jjg@1334 36 import com.sun.source.util.*;
jjg@1334 37
jjg@1334 38 public class T7196462 extends JavacTestingAbstractProcessor {
jjg@1334 39 public boolean process(Set<? extends TypeElement> annos,RoundEnvironment rEnv) {
jjg@1334 40 JavacTask t = JavacTask.instance(processingEnv);
jjg@1334 41 System.err.println(t);
jjg@1334 42 return true;
jjg@1334 43 }
jjg@1334 44 }

mercurial