613N/A/*
613N/A * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
613N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
613N/A *
613N/A * This code is free software; you can redistribute it and/or modify it
613N/A * under the terms of the GNU General Public License version 2 only, as
613N/A * published by the Free Software Foundation.
613N/A *
613N/A * This code is distributed in the hope that it will be useful, but WITHOUT
613N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
613N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
613N/A * version 2 for more details (a copy is included in the LICENSE file that
613N/A * accompanied this code).
613N/A *
613N/A * You should have received a copy of the GNU General Public License version
613N/A * 2 along with this work; if not, write to the Free Software Foundation,
613N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
613N/A *
613N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
613N/A * or visit www.oracle.com if you need additional information or have any
613N/A * questions.
613N/A */
613N/A
613N/A/*
613N/A * @test 6403456
613N/A * @summary -Werror should work with annotation processing
698N/A * @library ../../lib
698N/A * @build JavacTestingAbstractProcessor
613N/A * @compile WErrorLast.java
613N/A * @compile -proc:only -processor WErrorLast WErrorLast.java
613N/A * @compile/fail/ref=WErrorLast.out -XDrawDiagnostics -Werror -proc:only -processor WErrorLast WErrorLast.java
613N/A */
613N/A
613N/Aimport java.io.*;
613N/Aimport java.util.*;
613N/Aimport javax.annotation.processing.*;
613N/Aimport javax.lang.model.*;
613N/Aimport javax.lang.model.element.*;
613N/Aimport javax.tools.*;
613N/A
698N/Apublic class WErrorLast extends JavacTestingAbstractProcessor {
613N/A @Override
613N/A public boolean process(Set<? extends TypeElement> annotations,
613N/A RoundEnvironment roundEnv) {
613N/A if (roundEnv.processingOver()) {
613N/A messager.printMessage(Diagnostic.Kind.WARNING, "last round");
613N/A }
613N/A return true;
613N/A }
613N/A}