T7196462.java revision 1465:b52a38d4536c
1139804Simp/* 2885Swollman * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 3885Swollman * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4885Swollman * 5885Swollman * This code is free software; you can redistribute it and/or modify it 6885Swollman * under the terms of the GNU General Public License version 2 only, as 7885Swollman * published by the Free Software Foundation. 8885Swollman * 9885Swollman * This code is distributed in the hope that it will be useful, but WITHOUT 10885Swollman * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11885Swollman * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12885Swollman * version 2 for more details (a copy is included in the LICENSE file that 13885Swollman * accompanied this code). 14885Swollman * 15885Swollman * You should have received a copy of the GNU General Public License version 16885Swollman * 2 along with this work; if not, write to the Free Software Foundation, 1710625Sdg * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18885Swollman * 19885Swollman * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20885Swollman * or visit www.oracle.com if you need additional information or have any 21885Swollman * questions. 22885Swollman */ 23885Swollman 24885Swollman/* 25885Swollman * @test 26885Swollman * @bug 7196462 27116182Sobrien * @summary JavacProcessingEnvironment should tolerate BasicJavacTask 28116182Sobrien * @library /tools/javac/lib 29116182Sobrien * @build JavacTestingAbstractProcessor T7196462 302056Swollman * @compile/process -processor T7196462 T7196462.java 3140435Speter */ 3211332Sswallace 331549Srgrimesimport java.util.*; 342056Swollmanimport javax.annotation.processing.*; 352056Swollmanimport javax.lang.model.element.*; 36885Swollmanimport com.sun.source.util.*; 37886Swollman 38885Swollmanpublic class T7196462 extends JavacTestingAbstractProcessor { 39886Swollman public boolean process(Set<? extends TypeElement> annos,RoundEnvironment rEnv) { 40886Swollman JavacTask t = JavacTask.instance(processingEnv); 41886Swollman System.err.println(t); 42886Swollman return true; 43885Swollman } 44108533Sschweikh} 45140992Ssobomax