test/tools/javac/processing/6414633/T6414633.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 23,32 **** --- 23,34 ---- /* * @test * @bug 6414633 6440109 * @summary Only the first processor message at a source location is reported + * @library ../../lib + * @build JavacTestingAbstractProcessor * @build A T6414633 * @run main T6414633 */ import java.io.*;
*** 53,64 **** } Iterable<? extends JavaFileObject> files = fm.getJavaFileObjectsFromFiles(Arrays.asList(new File(testSrc, A.class.getName()+".java"))); String[] opts = { "-proc:only", "-processor", A.class.getName(), ! "-source", "1.6", ! "-classpath", testClasses }; JavacTask task = tool.getTask(null, fm, dl, Arrays.asList(opts), null, files); task.call(); // two annotations on the same element -- expect 2 diags from the processor if (dl.diags != 2) --- 55,65 ---- } Iterable<? extends JavaFileObject> files = fm.getJavaFileObjectsFromFiles(Arrays.asList(new File(testSrc, A.class.getName()+".java"))); String[] opts = { "-proc:only", "-processor", A.class.getName(), ! "-classpath", testClasses + System.getProperty("path.separator") + "../../lib" }; JavacTask task = tool.getTask(null, fm, dl, Arrays.asList(opts), null, files); task.call(); // two annotations on the same element -- expect 2 diags from the processor if (dl.diags != 2)