equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
97 "-processorpath", testClasses, |
97 "-processorpath", testClasses, |
98 "-processor", self, |
98 "-processor", self, |
99 "-d", "."}); |
99 "-d", "."}); |
100 |
100 |
101 JavaCompiler compiler = JavaCompiler.instance(context); |
101 JavaCompiler compiler = JavaCompiler.instance(context); |
102 compiler.initProcessAnnotations(null); |
102 compiler.compile(List.of(f)); |
103 JavaCompiler compiler2 = compiler.processAnnotations(compiler.enterTrees(compiler.parseFiles(List.of(f)))); |
|
104 try { |
103 try { |
105 compiler2.compile(List.of(f)); |
104 compiler.compile(List.of(f)); |
106 throw new Error("Error: AssertionError not thrown after second call of compile"); |
105 throw new Error("Error: AssertionError not thrown after second call of compile"); |
107 } catch (AssertionError e) { |
106 } catch (AssertionError e) { |
108 System.err.println("Exception from compiler (expected): " + e); |
107 System.err.println("Exception from compiler (expected): " + e); |
109 } |
108 } |
110 } |
109 } |