Mon, 14 Feb 2011 14:27:47 -0800
7008433: Minor copyright changes
Reviewed-by: jjg
Contributed-by: kelly.ohair@oracle.com
jjg@620 | 1 | /* |
jjg@620 | 2 | * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. |
jjg@620 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
jjg@620 | 4 | * |
jjg@620 | 5 | * This code is free software; you can redistribute it and/or modify it |
jjg@620 | 6 | * under the terms of the GNU General Public License version 2 only, as |
jjg@620 | 7 | * published by the Free Software Foundation. |
jjg@620 | 8 | * |
jjg@620 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
jjg@620 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
jjg@620 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
jjg@620 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
jjg@620 | 13 | * accompanied this code). |
jjg@620 | 14 | * |
jjg@620 | 15 | * You should have received a copy of the GNU General Public License version |
jjg@620 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
jjg@620 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
jjg@620 | 18 | * |
jjg@620 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
jjg@620 | 20 | * or visit www.oracle.com if you need additional information or have any |
jjg@620 | 21 | * questions. |
jjg@620 | 22 | */ |
jjg@620 | 23 | |
jjg@620 | 24 | /* |
jjg@620 | 25 | * @test 6966604 |
jjg@620 | 26 | * @summary JavacFiler not correctly notified of lastRound |
darcy@699 | 27 | * @library ../../lib |
darcy@699 | 28 | * @build JavacTestingAbstractProcessor |
jjg@620 | 29 | * @compile TestLastRound.java |
jjg@620 | 30 | * @compile/fail/ref=TestLastRound.out -XDrawDiagnostics -Werror -proc:only -processor TestLastRound TestLastRound.java |
jjg@620 | 31 | */ |
jjg@620 | 32 | |
jjg@620 | 33 | import java.io.*; |
jjg@620 | 34 | import java.util.*; |
jjg@620 | 35 | import javax.annotation.processing.*; |
jjg@620 | 36 | import javax.lang.model.*; |
jjg@620 | 37 | import javax.lang.model.element.*; |
jjg@620 | 38 | import javax.tools.*; |
jjg@620 | 39 | |
darcy@699 | 40 | public class TestLastRound extends JavacTestingAbstractProcessor { |
jjg@620 | 41 | @Override |
jjg@620 | 42 | public boolean process(Set<? extends TypeElement> annotations, |
jjg@620 | 43 | RoundEnvironment roundEnv) { |
jjg@620 | 44 | if (roundEnv.processingOver()) { |
jjg@620 | 45 | try { |
jjg@620 | 46 | JavaFileObject fo = filer.createSourceFile("LastRound.java"); |
jjg@620 | 47 | Writer out = fo.openWriter(); |
jjg@620 | 48 | out.write("class LastRound { }"); |
jjg@620 | 49 | out.close(); |
jjg@620 | 50 | } catch (IOException e) { |
jjg@620 | 51 | } |
jjg@620 | 52 | } |
jjg@620 | 53 | return true; |
jjg@620 | 54 | } |
jjg@620 | 55 | } |