Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.
This repository was archived by the owner on Mar 2, 2026. It is now read-only.

Compile tasks for additional source sets don't include the checker framework dependency #247

@beikov

Description

@beikov

Originally reported here typetools/checker-framework#5787, the problem is that an additional source set which I added did not receive the compileOnly dependencies like the main and test source sets. This leads to this strange error

Caused by: java.lang.NullPointerException: Cannot invoke "java.util.TreeSet.clear()" because "this.messageStore" is null
	at org.checkerframework.common.basetype.BaseTypeChecker.typeProcess(BaseTypeChecker.java:537)
	at org.checkerframework.javacutil.AbstractTypeProcessor$AttributionTaskListener.finished(AbstractTypeProcessor.java:188)
	at jdk.compiler/com.sun.tools.javac.api.ClientCodeWrapper$WrappedTaskListener.finished(ClientCodeWrapper.java:854)
	at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1394)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1351)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:946)
	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
	... 31 more

because the compile task doesn't have the -qual artifact in the compileOnly configuration. I understand that this might be a self made problem, but I think that the plugin should try to add the dependencies to all compile tasks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions