Skip to content

Needless type parameter for Signal.effect method #23973

@Legioth

Description

@Legioth

Description of the bug

The type signature of the effect functions are:

static <C extends Component> Registration effect(C owner, EffectAction effectFunction);
static <C extends Component> Registration effect(C owner, ContextualEffectAction effectFunction);

Declaring C as a type parameter serves no purpose here. It's probably a leftover from a previous API shape. The main impact now is that auto completion in the IDE shows the type as C instead of Component, thus making it more difficult to understand what to pass there.

Expected behavior

The type signatures should be:

static Registration effect(Component owner, EffectAction effectFunction);
static Registration effect(Component owner, ContextualEffectAction effectFunction);

Minimal reproducible example

N/A

Versions

  • Vaadin / Flow version: Vaadin 25.1.0-rc2

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    🔖 Normal Priority (P2)

    Status

    🟢Ready to Go

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions