test/tools/javac/processing/errors/TestOptionSyntaxErrors.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.
*** 24,33 ****
--- 24,35 ----
/*
* @test
* @bug 6406212
* @summary Test that annotation processor options with illegal syntax are rejected
* @author Joseph D. Darcy
+ * @library ../../lib
+ * @build JavacTestingAbstractProcessor
* @compile TestOptionSyntaxErrors.java
* @compile/fail -A TestOptionSyntaxErrors.java
* @compile/fail -A8adOption TestOptionSyntaxErrors.java
* @compile/fail -A8adOption=1worseOption TestOptionSyntaxErrors.java
* @compile/fail -processor TestOptionSyntaxErrors -proc:only -A TestOptionSyntaxErrors.java
*** 44,59 ****
import static javax.tools.Diagnostic.Kind.*;
/**
* No-op processor; should not be run.
*/
! @SupportedAnnotationTypes("*")
! public class TestOptionSyntaxErrors extends AbstractProcessor {
public boolean process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnvironment) {
return true;
}
-
- public SourceVersion getSupportedSourceVersion() {
- return SourceVersion.latest();
- }
}
--- 46,56 ----
import static javax.tools.Diagnostic.Kind.*;
/**
* No-op processor; should not be run.
*/
! public class TestOptionSyntaxErrors extends JavacTestingAbstractProcessor {
public boolean process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnvironment) {
return true;
}
}