Repository navigation
fix: never claim annotations in BuilderProcessor - #332
Merged
AndreasIgel merged 1 commit intoOct 5, 2026
Merged
AndreasIgel merged 1 commit into
AndreasIgel merged 1 commit into
Conversation
With @SupportedAnnotationTypes("*") — required for discovering
user-defined template annotations — returning true claimed every
annotation of the round for this processor, starving all other
processors sharing the annotation processor path (e.g. MapStruct
never seeing @Mapper). process() now always returns false, with
javadoc explaining the never-claim contract.
Fixes java-helpers#331
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Fixes #331.
BuilderProcessordeclares@SupportedAnnotationTypes("*")— required so user-defined@SimpleBuilder.Templatemeta-annotations (arbitrary names) still reach the processor — and endedprocess()withreturn true. Under annotation-processing claiming semantics that claims all annotations in the round over the wildcard supported set, starving every processor ordered after it on a shared annotation processor path: e.g.mapstruct-processornever sees@Mapperand silently generates no mappers.process()now always returnsfalse— simple-builders never needs to claim; a subset claim is not expressible (the boolean applies to the whole supported set). Javadoc documents the never-claim contract and thejava:S3516suppression for the intentionally constant return.Split out of #312, where the fix surfaced while adding the MapStruct SPI integration (which itself relies on other processors still seeing their annotations).
Verification
Behavior-neutral for simple-builders itself (it claims nothing it needs back); existing processor suite unchanged.
Written by Devin