Skip to content

Create util to perform generic aware callbacks #11584

Closed

Description

@philwebb

We have quite a few calls now that use generically typed listeners of the form:

public interface SomeListener<T> {

    call(T arg);

}

The pattern to filter the listeners based on a resolvable type, make the call and deal with possible Lamda issues could be extracted.

Search the codebase for "Possibly a lambda-defined" to find the existing occurrences.

Activity

  1. snicoll commented on Jan 9, 2018

    @snicoll
    Member

    That could be a core util in the framework.

  2. philwebb commented on Jan 9, 2018

    @philwebb
    MemberAuthor

    @spencergibb It would be more involved I think. I'd like to cut out the generic resolution and lambda try..catch dance that we keep repeating. See this code for an example.

  3. spencergibb commented on Jan 9, 2018

    @spencergibb
    Member

    👍

  4. added this to the 2.0.0.RC1 milestone on Jan 30, 2018
  5. philwebb commented on Jan 30, 2018

    @philwebb
    MemberAuthor

    One bonus of the extra tests is it seems to have found a problem when running on JDK 9. I think framework also has the same issue so I've raised SPR-16435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions