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