test/tools/javac/T6358168.java

changeset 1055
7337295434b6
parent 554
9d9f26857129
child 2525
2eb010b6cb22
equal deleted inserted replaced
1054:111bbf1ad913 1055:7337295434b6
1 /* 1 /*
2 * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2006, 2011, 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.
70 Context context = new Context(); 70 Context context = new Context();
71 fm.setContext(context); 71 fm.setContext(context);
72 72
73 Main compilerMain = new Main("javac", new PrintWriter(System.err, true)); 73 Main compilerMain = new Main("javac", new PrintWriter(System.err, true));
74 compilerMain.setOptions(Options.instance(context)); 74 compilerMain.setOptions(Options.instance(context));
75 compilerMain.filenames = new ListBuffer<File>(); 75 compilerMain.filenames = new LinkedHashSet<File>();
76 compilerMain.processArgs(new String[] { "-d", "." }); 76 compilerMain.processArgs(new String[] { "-d", "." });
77 77
78 JavaCompiler compiler = JavaCompiler.instance(context); 78 JavaCompiler compiler = JavaCompiler.instance(context);
79 compiler.compile(List.of(f)); 79 compiler.compile(List.of(f));
80 try { 80 try {
89 Context context = new Context(); 89 Context context = new Context();
90 fm.setContext(context); 90 fm.setContext(context);
91 91
92 Main compilerMain = new Main("javac", new PrintWriter(System.err, true)); 92 Main compilerMain = new Main("javac", new PrintWriter(System.err, true));
93 compilerMain.setOptions(Options.instance(context)); 93 compilerMain.setOptions(Options.instance(context));
94 compilerMain.filenames = new ListBuffer<File>(); 94 compilerMain.filenames = new LinkedHashSet<File>();
95 compilerMain.processArgs(new String[] { 95 compilerMain.processArgs(new String[] {
96 "-XprintRounds", 96 "-XprintRounds",
97 "-processorpath", testClasses, 97 "-processorpath", testClasses,
98 "-processor", self, 98 "-processor", self,
99 "-d", "."}); 99 "-d", "."});

mercurial