Skip to content

WELD-2688 Allow usage of @Priority on stereotypes, add tests.#2559

Merged
manovotn merged 1 commit intoweld:masterfrom
manovotn:weld2688
Nov 12, 2021
Merged

WELD-2688 Allow usage of @Priority on stereotypes, add tests.#2559
manovotn merged 1 commit intoweld:masterfrom
manovotn:weld2688

Conversation

@manovotn
Copy link
Copy Markdown
Member

@manovotn manovotn commented Nov 4, 2021

Allows usage of @Priority on stereotypes - implements a recursive search of stereotypes for priority annotation in order to register globally enabled alternatives.

@manovotn manovotn marked this pull request as ready for review November 4, 2021 13:42
@manovotn manovotn requested a review from mkouba November 4, 2021 13:42
@manovotn
Copy link
Copy Markdown
Member Author

manovotn commented Nov 9, 2021

I have added a commit that introduced two tests for inherited stereotypes - one that should succeed and one that introduces two inherited and conflicting stereotypes. I'll add the same to the TCK PR.

@manovotn manovotn force-pushed the weld2688 branch 2 times, most recently from 0165423 to 212f10c Compare November 12, 2021 13:53
@manovotn
Copy link
Copy Markdown
Member Author

@mkouba @Ladicek this PR is now modified so that the scenario we discussed results in a DefinitionException because it has been well specified via jakartaee/cdi#557.
I have adapted the implementation accordingly and added a test for this case.

Copy link
Copy Markdown
Contributor

@Ladicek Ladicek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took me a little while to realize that CDI disallows transforming annotations on annotations and hence it's fine to look directly at the Class objects :-)

@manovotn manovotn merged commit 8dfd644 into weld:master Nov 12, 2021
@manovotn manovotn deleted the weld2688 branch November 12, 2021 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants