Skip to content

Allow contravariant wildcards in Event and covariant wildcards in Instance#3363

Open
manovotn wants to merge 1 commit into
weld:6.0from
manovotn:wildcard-event-contravariant-6.0
Open

Allow contravariant wildcards in Event and covariant wildcards in Instance#3363
manovotn wants to merge 1 commit into
weld:6.0from
manovotn:wildcard-event-contravariant-6.0

Conversation

@manovotn
Copy link
Copy Markdown
Member

@manovotn manovotn commented Jun 3, 2026

Fixes #3362

@manovotn manovotn linked an issue Jun 3, 2026 that may be closed by this pull request
@manovotn manovotn force-pushed the wildcard-event-contravariant-6.0 branch from b433974 to 05d4be0 Compare June 3, 2026 13:57
/**
* Event is contravariant so {@code Event<? super X>} is allowed.
* Instance is covariant so {@code Instance<? extends X>} is allowed.
* Unbounded wildcards are rejected for both.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I thought it's obvious, but clearly it's not, because you did the exact opposite of what I did :-) I'll have to specify this explicitly.

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.

Validation of wildcard Event and Instance injection is too strict

2 participants