author | vromero |
Tue, 03 Apr 2018 23:58:52 -0400 | |
changeset 49518 | d0ff431a596e |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
30066
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
1 |
/* |
49518
d0ff431a596e
8198314: javac hidden options violate standard syntax for options
vromero
parents:
47216
diff
changeset
|
2 |
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. |
30066
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
4 |
* |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
8 |
* |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
13 |
* accompanied this code). |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
14 |
* |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
18 |
* |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
21 |
* questions. |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
22 |
*/ |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
23 |
|
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
24 |
/** |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
25 |
* @test |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
26 |
* @bug 8078600 |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
27 |
* @summary Make sure -XDcompletionDeps does not cause an infinite loop. |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
28 |
* @library /tools/lib |
36712
4e2c412dc519
8152503: tools/javac/completionDeps/DepsAndAnno.java fails after jigsaw m3
mchung
parents:
30066
diff
changeset
|
29 |
* @modules jdk.compiler/com.sun.tools.javac.api |
4e2c412dc519
8152503: tools/javac/completionDeps/DepsAndAnno.java fails after jigsaw m3
mchung
parents:
30066
diff
changeset
|
30 |
* jdk.compiler/com.sun.tools.javac.main |
36778
e04318f39f92
8152897: refactor ToolBox to allow reduced documented dependencies
jjg
parents:
36712
diff
changeset
|
31 |
* @build toolbox.ToolBox toolbox.JavacTask |
30066
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
32 |
* @run main/othervm/timeout=10 DepsAndAnno |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
33 |
*/ |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
34 |
|
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
35 |
import java.lang.annotation.ElementType; |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
36 |
import java.lang.annotation.Target; |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
37 |
|
36778
e04318f39f92
8152897: refactor ToolBox to allow reduced documented dependencies
jjg
parents:
36712
diff
changeset
|
38 |
import toolbox.JavacTask; |
e04318f39f92
8152897: refactor ToolBox to allow reduced documented dependencies
jjg
parents:
36712
diff
changeset
|
39 |
import toolbox.Task; |
e04318f39f92
8152897: refactor ToolBox to allow reduced documented dependencies
jjg
parents:
36712
diff
changeset
|
40 |
import toolbox.ToolBox; |
e04318f39f92
8152897: refactor ToolBox to allow reduced documented dependencies
jjg
parents:
36712
diff
changeset
|
41 |
|
30066
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
42 |
public class DepsAndAnno { |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
43 |
|
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
44 |
@Target(ElementType.METHOD) |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
45 |
@interface Test { } |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
46 |
|
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
47 |
public static void main(String[] args) { |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
48 |
ToolBox toolBox = new ToolBox(); |
36778
e04318f39f92
8152897: refactor ToolBox to allow reduced documented dependencies
jjg
parents:
36712
diff
changeset
|
49 |
new JavacTask(toolBox, Task.Mode.CMDLINE) |
49518
d0ff431a596e
8198314: javac hidden options violate standard syntax for options
vromero
parents:
47216
diff
changeset
|
50 |
.options("--debug=completionDeps") |
30066
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
51 |
.outdir(".") |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
52 |
.files(ToolBox.testSrc + "/DepsAndAnno.java") |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
53 |
.run(); |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
54 |
} |
d74c06a92bd8
8078600: Infinite loop when compiling annotations with -XDcompletionDeps
alundblad
parents:
diff
changeset
|
55 |
} |