Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-2638

Default methods wont function when a different interface defines the same method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 2.4.8.Final, 3.1.5.Final
    • Proxies
    • None
    • Hide

      To recreate the problem start the attached app and navigate to "<context-root>/medium" or "<context-root>/exact"

      Show
      To recreate the problem start the attached app and navigate to "<context-root>/medium" or "<context-root>/exact"
    • Undefined

      I have found a bug that looks very similar to WELD-2407 on releases that contain the fix.

      If a class implements two interfaces, one of which is a generic interface with an default implementation of a method. The other is a non-generic interface, which extends an generic interface that has a non-default deceleration of that same method, then I can see the same exception as WELD-2407. I have attached a recreate file with source which will make it a lot clearer.

      This is purely speculative, but perhaps when weld builds the proxy it is seeing the regular deceleration first and then ignoring the default method as a duplicate?

      I have tested this on IBM liberty with weld 2.4.8 and 3.1.0, and I have attached an FFDC file that contains the stack.

      I have also attached a war file with sources that demonstrates the problem. Inside the war file there are three packages

      • simple - which does not recreate the problem. I have left this here in order to provide a counter example.
      • exact - which recreates the problem using the same type hierarchy as the customer who reported this problem to me.
      • medium - where I simplified the type hierarchy a little.

        1. WeldProxyRecreate.war
          15 kB
        2. server.xml
          0.7 kB
        3. ffdc_20.09.18_11.54.26.0.log
          91 kB

              Unassigned Unassigned
              benjamin-confino Benjamin Confino (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: