Skip to content

Commit

Permalink
Ignore Javadoc for compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
mickaelistria committed Nov 19, 2024
1 parent 96196bf commit c55c0b7
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@
import com.sun.tools.javac.file.CacheFSInfo;
import com.sun.tools.javac.file.JavacFileManager;
import com.sun.tools.javac.main.JavaCompiler;
import com.sun.tools.javac.main.Option;
import com.sun.tools.javac.tree.JCTree.JCClassDecl;
import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
import com.sun.tools.javac.util.Context;
import com.sun.tools.javac.util.Options;
import com.sun.tools.javac.util.Pair;

public class JavacCompiler extends Compiler {
Expand Down Expand Up @@ -104,7 +106,6 @@ public void compile(ICompilationUnit[] sourceUnits) {
JavacTaskListener javacListener = new JavacTaskListener(this.compilerConfig, outputSourceMapping, this.problemFactory, this.fileObjectToCUMap);

for (Entry<IContainer, List<ICompilationUnit>> outputSourceSet : outputSourceMapping.entrySet()) {

Context javacContext = new Context();
CacheFSInfo.preRegister(javacContext);
JavacProblemConverter problemConverter = new JavacProblemConverter(this.compilerConfig.compilerOptions(), javacContext);
Expand Down Expand Up @@ -140,6 +141,10 @@ public void finished(TaskEvent e) {
var outputDir = JavacClassFile.getMappedTempOutput(outputSourceSet.getKey()).toFile();
javacListener.setOutputDir(outputSourceSet.getKey());
JavacUtils.configureJavacContext(javacContext, this.compilerConfig, javaProject, outputDir, true);
// Javadoc problem are not reported by builder
var javacOptions = Options.instance(javacContext);
javacOptions.remove(Option.XDOCLINT.primaryName);
javacOptions.remove(Option.XDOCLINT_CUSTOM.primaryName);
JavaCompiler javac = new JavaCompiler(javacContext) {
boolean isInGeneration = false;

Expand Down

0 comments on commit c55c0b7

Please sign in to comment.