1515
1616import java .util .Collections ;
1717
18- import java . util . Locale ;
18+
1919import java .util .Set ;
20- import java .util .concurrent .atomic .AtomicReference ;
2120
2221import javax .annotation .processing .Completion ;
2322import javax .annotation .processing .ProcessingEnvironment ;
2827import javax .lang .model .element .Element ;
2928import javax .lang .model .element .ExecutableElement ;
3029import javax .lang .model .element .TypeElement ;
31- import javax .tools .Diagnostic ;
3230
3331import org .joor .CompileOptions ;
3432import org .joor .Reflect ;
@@ -156,7 +154,6 @@ public SourceVersion getSupportedSourceVersion() {
156154
157155 @ Override
158156 public void init (ProcessingEnvironment processingEnv ) {
159- processingEnv .getMessager ().printMessage (Diagnostic .Kind .NOTE , "running " + getClass ().getName ());
160157 }
161158
162159 @ Override
@@ -182,16 +179,10 @@ public Iterable<? extends Completion> getCompletions(Element element, Annotation
182179 * see https://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html
183180 */
184181 @ Test
185- public void testProcOnlyWithDiagnostics () {
186- AtomicReference <String > diagMessage = new AtomicReference <>();
182+ public void testProcOnly () {
187183 Object result = Reflect .compile ("p.D" , "package p; public class D extends B {} class B {}" ,
188- new CompileOptions ().options ("-proc:only" )
189- .processors (new AProcessor ())
190- .withDiagnosticListener (diagnostic -> {
191- diagMessage .set (diagnostic .getMessage (Locale .ENGLISH ));
192- }));
184+ new CompileOptions ().options ("-proc:only" ).processors (new AProcessor ()));
193185 assertNull (result );
194- assertNotNull (diagMessage .get ());
195186 }
196187
197188}
0 commit comments