author | jlahoda |
Thu, 28 Jun 2018 10:05:39 +0200 | |
changeset 50867 | e84038f37713 |
permissions | -rw-r--r-- |
50867
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
1 |
/* |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
2 |
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
4 |
* |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
8 |
* |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
13 |
* accompanied this code). |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
14 |
* |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
18 |
* |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
21 |
* questions. |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
22 |
*/ |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
23 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
24 |
/** |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
25 |
* @test |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
26 |
* @bug 8195986 |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
27 |
* @summary Verify the type of String does not change across annotation processing rounds |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
28 |
* @library /tools/lib |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
29 |
* @modules |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
30 |
* jdk.compiler/com.sun.tools.javac.api |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
31 |
* jdk.compiler/com.sun.tools.javac.main |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
32 |
* @build toolbox.ToolBox toolbox.JavacTask toolbox.TestRunner |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
33 |
* @run main ValidTypesAreKept |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
34 |
*/ |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
35 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
36 |
import java.nio.file.Files; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
37 |
import java.nio.file.Path; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
38 |
import java.nio.file.Paths; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
39 |
import java.util.Set; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
40 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
41 |
import javax.annotation.processing.AbstractProcessor; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
42 |
import javax.annotation.processing.RoundEnvironment; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
43 |
import javax.annotation.processing.SupportedAnnotationTypes; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
44 |
import javax.lang.model.SourceVersion; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
45 |
import javax.lang.model.element.TypeElement; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
46 |
import javax.lang.model.type.TypeMirror; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
47 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
48 |
import toolbox.JavacTask; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
49 |
import toolbox.Task; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
50 |
import toolbox.TestRunner; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
51 |
import toolbox.ToolBox; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
52 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
53 |
public class ValidTypesAreKept extends TestRunner { |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
54 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
55 |
private ToolBox tb; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
56 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
57 |
public ValidTypesAreKept() { |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
58 |
super(System.err); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
59 |
tb = new ToolBox(); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
60 |
} |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
61 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
62 |
public static void main(String... args) throws Exception { |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
63 |
new ValidTypesAreKept().runTests(); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
64 |
} |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
65 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
66 |
@Test |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
67 |
public void testBrokenErrors() throws Exception { |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
68 |
Path base = Paths.get("."); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
69 |
Path src = base.resolve("src"); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
70 |
Path classes = base.resolve("classes"); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
71 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
72 |
Files.createDirectories(classes); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
73 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
74 |
tb.writeJavaFiles(src, |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
75 |
"package t; @A(B.E) public @interface A { B value(); }", |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
76 |
"package t; public enum B { E; }"); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
77 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
78 |
new JavacTask(tb) |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
79 |
.outdir(classes) |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
80 |
.files(tb.findJavaFiles(src)) |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
81 |
.run() |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
82 |
.writeAll() |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
83 |
.getOutput(Task.OutputKind.DIRECT); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
84 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
85 |
Files.delete(classes.resolve("t").resolve("B.class")); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
86 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
87 |
Path src2 = base.resolve("src2"); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
88 |
Path classes2 = base.resolve("classes2"); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
89 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
90 |
Files.createDirectories(classes2); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
91 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
92 |
Path output2 = base.resolve("output2"); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
93 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
94 |
Files.createDirectories(output2); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
95 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
96 |
tb.writeJavaFiles(src2, |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
97 |
"package t2; @t.A class C { public native void t(String str); }"); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
98 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
99 |
new JavacTask(tb) |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
100 |
.classpath(classes) |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
101 |
.options("-processor", AP.class.getName(), |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
102 |
"--processor-path", System.getProperty("test.classes"), |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
103 |
"-h", output2.toString()) |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
104 |
.outdir(classes2) |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
105 |
.files(tb.findJavaFiles(src2)) |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
106 |
.run() |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
107 |
.writeAll() |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
108 |
.getOutput(Task.OutputKind.DIRECT); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
109 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
110 |
String content = new String(Files.readAllBytes(output2.resolve("t2_C.h"))); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
111 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
112 |
if (!content.contains("(JNIEnv *, jobject, jstring)")) { |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
113 |
fail("incorrect header file content: " + content); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
114 |
} |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
115 |
} |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
116 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
117 |
@SupportedAnnotationTypes("*") |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
118 |
public static final class AP extends AbstractProcessor { |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
119 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
120 |
private TypeMirror stringType; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
121 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
122 |
@Override |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
123 |
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
124 |
TypeElement str = processingEnv.getElementUtils().getTypeElement("java.lang.String"); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
125 |
if (str == null) { |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
126 |
throw new AssertionError("java.lang.String"); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
127 |
} |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
128 |
if (stringType == null) { |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
129 |
stringType = str.asType(); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
130 |
} else { |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
131 |
if (stringType != str.asType()) { |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
132 |
throw new AssertionError("The type of j.l.String changed."); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
133 |
} |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
134 |
} |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
135 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
136 |
return false; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
137 |
} |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
138 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
139 |
@Override |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
140 |
public SourceVersion getSupportedSourceVersion() { |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
141 |
return SourceVersion.latest(); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
142 |
} |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
143 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
144 |
} |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
145 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
146 |
private static void assertNonNull(String msg, Object val) { |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
147 |
if (val == null) { |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
148 |
throw new AssertionError(msg); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
149 |
} |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
150 |
} |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
151 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
152 |
static Path resolveFile(Path base, String... pathElements) { |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
153 |
Path file = base; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
154 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
155 |
for (String el : pathElements) { |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
156 |
file = file.resolve(el); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
157 |
} |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
158 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
159 |
return file; |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
160 |
} |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
161 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
162 |
private static void fail(String msg) { |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
163 |
throw new AssertionError(msg); |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
164 |
} |
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
165 |
|
e84038f37713
8195986: Incorrect javac -h output with annotation processing and missing classes
jlahoda
parents:
diff
changeset
|
166 |
} |