Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.Final, 2.0-EDR1
    • Fix Version/s: None
    • Component/s: Events
    • Labels:
      None

      Description

      As stated in various discussion on JDK8, lambda expressions don't allow to retrieve parameter types by reflection.

      See:
      http://jdk8-dev.openjdk.java.narkive.com/bSPiKxap/jdk-8-lambda-reflection-issues

      As section 10.1 of the spec states:

      The event types of the event include all superclasses and interfaces of the runtime class of the event object.

      In case of a lambda payload, observer resolution will fails when respecting the rule above since parameter type won't be retrieve from the lambda.

      For instance the following code

          @Inject
          Event<Supplier<String>> stringSupplierEvent;
      ...
          Supplier<String> stringSupplier = () -> "Hello world";
          stringSupplierEvent.fire(stringSupplier);
      

      will triggers an observer for Supplier but not an observer for Supplier<String>.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  antoinesabot-durand Antoine Sabot-Durand
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: