src/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java

changeset 1603
6118072811e5
parent 1591
dc8b7aa7cef3
parent 1569
475eb15dfdad
child 2047
5f915a0c9615
equal deleted inserted replaced
1602:dabb36173c63 1603:6118072811e5
156 if (used.getAndSet(true)) { 156 if (used.getAndSet(true)) {
157 if (compiler == null) 157 if (compiler == null)
158 throw new IllegalStateException(); 158 throw new IllegalStateException();
159 } else { 159 } else {
160 initContext(); 160 initContext();
161 compilerMain.log = Log.instance(context);
161 compilerMain.setOptions(Options.instance(context)); 162 compilerMain.setOptions(Options.instance(context));
162 compilerMain.filenames = new LinkedHashSet<File>(); 163 compilerMain.filenames = new LinkedHashSet<File>();
163 Collection<File> filenames = compilerMain.processArgs(CommandLine.parse(args), classNames); 164 Collection<File> filenames = compilerMain.processArgs(CommandLine.parse(args), classNames);
164 if (!filenames.isEmpty()) 165 if (filenames != null && !filenames.isEmpty())
165 throw new IllegalArgumentException("Malformed arguments " + toString(filenames, " ")); 166 throw new IllegalArgumentException("Malformed arguments " + toString(filenames, " "));
166 compiler = JavaCompiler.instance(context); 167 compiler = JavaCompiler.instance(context);
167 compiler.keepComments = true; 168 compiler.keepComments = true;
168 compiler.genEndPos = true; 169 compiler.genEndPos = true;
169 // NOTE: this value will be updated after annotation processing 170 // NOTE: this value will be updated after annotation processing

mercurial