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

Prevent compiled lambdas in class from being processed as interceptable methods

XMLWordPrintable

      Currently, in some rather rare scenarios, a compiled lambda will not be static and will therefore be considered as a class-declared method for interception.
      This is mostly harmless as we never really invoke it.

      However, in combination with ECJ (Eclipse Compiler) and hierarchy of classes all using lambdas, Weld can end up attempting to intercept even a static variant which will result in an exception when creating the subclass. This is due to EJC compiling lambdas differently, specifically using different naming which leads do different method signatures.

      We can improve how we filter out candidates for interceptable methods to filter out lambdas from even being considered. There is no universal way to do this as we need to consider some synthetic methods. Can we filter out all methods are are synthetic and aren't bridge methods though.

      Note that this cannot be easily tested unless ECJ is used (which we don't have in tests) so the PRs won't have automated tests attached to them.

              manovotn Matěj Novotný
              manovotn Matěj Novotný
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: