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

Self-interception is limited to public methods with public params and return type

    XMLWordPrintable

Details

    Description

      Recent discussion has shown that self-interception in Weld has some weird limitations.

      I have created a branch that shows some of the cases and can be seen here.

      Our interceptor subclasses seem to generate correct code for all methods, however client proxies generate different code based on whether we use bytecode invocation or reflection via method handlers. See ClientProxyFactory code.

      The difference seems to be that the bytecode invocation includes InterceptionDecorationContext.startIfNotEmpty() whereas handler invocation doesn't.

      So far I have not been able to verify why we only allow public access modifier in the aforementioned condition. But from my testing it seems that changing this condition works fine for tests I created. That being said, I suspect that there could be problems with private and package-private access modifiers given that the proxy can exist in different packages?

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: