jjg@620: /* jjg@620: * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. jjg@620: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jjg@620: * jjg@620: * This code is free software; you can redistribute it and/or modify it jjg@620: * under the terms of the GNU General Public License version 2 only, as jjg@620: * published by the Free Software Foundation. jjg@620: * jjg@620: * This code is distributed in the hope that it will be useful, but WITHOUT jjg@620: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jjg@620: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jjg@620: * version 2 for more details (a copy is included in the LICENSE file that jjg@620: * accompanied this code). jjg@620: * jjg@620: * You should have received a copy of the GNU General Public License version jjg@620: * 2 along with this work; if not, write to the Free Software Foundation, jjg@620: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jjg@620: * jjg@620: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA jjg@620: * or visit www.oracle.com if you need additional information or have any jjg@620: * questions. jjg@620: */ jjg@620: jjg@620: /* jjg@620: * @test 6966604 jjg@620: * @summary JavacFiler not correctly notified of lastRound darcy@1466: * @library /tools/javac/lib darcy@699: * @build JavacTestingAbstractProcessor jjg@620: * @compile TestLastRound.java jjg@620: * @compile/fail/ref=TestLastRound.out -XDrawDiagnostics -Werror -proc:only -processor TestLastRound TestLastRound.java jjg@620: */ jjg@620: jjg@620: import java.io.*; jjg@620: import java.util.*; jjg@620: import javax.annotation.processing.*; jjg@620: import javax.lang.model.*; jjg@620: import javax.lang.model.element.*; jjg@620: import javax.tools.*; jjg@620: darcy@699: public class TestLastRound extends JavacTestingAbstractProcessor { jjg@620: @Override jjg@620: public boolean process(Set annotations, jjg@620: RoundEnvironment roundEnv) { jjg@620: if (roundEnv.processingOver()) { jjg@620: try { jjg@620: JavaFileObject fo = filer.createSourceFile("LastRound.java"); jjg@620: Writer out = fo.openWriter(); jjg@620: out.write("class LastRound { }"); jjg@620: out.close(); jjg@620: } catch (IOException e) { jjg@620: } jjg@620: } jjg@620: return true; jjg@620: } jjg@620: }