Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Brychcy2017-11-03 16:03:29 -0400
committerTill Brychcy2017-11-06 01:06:36 -0500
commit0636dfcefd86dbc60e1602c4836ecf7111822e9c (patch)
treeb91944283dd40ce8367b4e88d4d8b2fef8687ec8 /org.eclipse.jdt.compiler.apt.tests
parentdf77b5be3a3ba63f5048680c79a4f300c6b71068 (diff)
downloadeclipse.jdt.core-0636dfcefd86dbc60e1602c4836ecf7111822e9c.tar.gz
eclipse.jdt.core-0636dfcefd86dbc60e1602c4836ecf7111822e9c.tar.xz
eclipse.jdt.core-0636dfcefd86dbc60e1602c4836ecf7111822e9c.zip
Bug 526288 - AutoValue annotation processor causes
java.lang.NoSuchFieldError: MODULE Change-Id: Iaa4f311ab9064e9f8e55cc80d0d6f4635b08141d
Diffstat (limited to 'org.eclipse.jdt.compiler.apt.tests')
-rw-r--r--org.eclipse.jdt.compiler.apt.tests/lib/apttestprocessors8.jarbin232966 -> 232878 bytes
-rw-r--r--org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/Java8ElementProcessor.java7
-rw-r--r--org.eclipse.jdt.compiler.apt.tests/resources/targets/bug526288/Bug526288.java6
-rw-r--r--org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/Java8ElementsTests.java4
4 files changed, 17 insertions, 0 deletions
diff --git a/org.eclipse.jdt.compiler.apt.tests/lib/apttestprocessors8.jar b/org.eclipse.jdt.compiler.apt.tests/lib/apttestprocessors8.jar
index 4fc9a5e2e9..fb1d9f4e95 100644
--- a/org.eclipse.jdt.compiler.apt.tests/lib/apttestprocessors8.jar
+++ b/org.eclipse.jdt.compiler.apt.tests/lib/apttestprocessors8.jar
Binary files differ
diff --git a/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/Java8ElementProcessor.java b/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/Java8ElementProcessor.java
index 078e88f6f5..028b997c31 100644
--- a/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/Java8ElementProcessor.java
+++ b/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/Java8ElementProcessor.java
@@ -171,6 +171,7 @@ public class Java8ElementProcessor extends BaseProcessor {
testTypeAnnotations27();
//testPackageAnnotations();
testBug520540();
+ testBug526288();
testEnumConstArguments();
}
@@ -1031,6 +1032,11 @@ public class Java8ElementProcessor extends BaseProcessor {
}
assertEquals("found incorrect types", 0, typeElements.size());
}
+ public void testBug526288() {
+ PackageElement packageElement = _elementUtils.getPackageElement("targets.testBug526288");
+ assertNotNull("package element should not be null", packageElement);
+ assertNull("package should have no enclosing element", packageElement.getEnclosingElement());
+ }
public void testEnumConstArguments() {
TypeElement annotatedType = _elementUtils.getTypeElement("targets.bug521812.MyEnum");
List<? extends Element> enclosedElements = annotatedType.getEnclosedElements();
@@ -1051,6 +1057,7 @@ public class Java8ElementProcessor extends BaseProcessor {
assertEquals("Parameter type should be same", param.asType(), asType2);
}
}
+
private void createPackageBinary() throws IOException {
String path = packageName.replace('.', '/');
ClassLoader loader = getClass().getClassLoader();
diff --git a/org.eclipse.jdt.compiler.apt.tests/resources/targets/bug526288/Bug526288.java b/org.eclipse.jdt.compiler.apt.tests/resources/targets/bug526288/Bug526288.java
new file mode 100644
index 0000000000..db9fd34e0a
--- /dev/null
+++ b/org.eclipse.jdt.compiler.apt.tests/resources/targets/bug526288/Bug526288.java
@@ -0,0 +1,6 @@
+package targets.bug526288;
+
+@org.eclipse.jdt.compiler.apt.tests.annotations.Type()
+public class Bug526288 {
+ //
+}
diff --git a/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/Java8ElementsTests.java b/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/Java8ElementsTests.java
index b2b88767b5..f19a85c423 100644
--- a/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/Java8ElementsTests.java
+++ b/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/Java8ElementsTests.java
@@ -361,6 +361,10 @@ public class Java8ElementsTests extends TestCase {
assertEquals(true, success);
assertEquals("succeeded", System.getProperty(JAVA8_ANNOTATION_PROC));
}
+ public void testBug526288() throws Exception {
+ JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
+ internalTest(compiler, JAVA8_ANNOTATION_PROC, "testBug526288", "Bug526288.java", "bug526288");
+ }
public void testEnumConstArgumentsBinary() throws Exception {
JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
internalTestWithBinary(compiler, JAVA8_ANNOTATION_PROC, "testEnumConstArguments", null, "bug521812");

Back to the top