Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-70808

ServiceBeanMethodInvocationFactoryUtil fails on static methods

    Details

      Description

      When the first argument passed to ServiceBeanMethodInvocationFactoryUtil.proceed is null when trying to invoke a method in a transaction, a NPE is thrown. This at least used to be a very valid use-case, as there is no object to pass as a first argument if the method being called is a static method.

      For instance methods:

      • instanceMethod.invoke(obj, arguments);
      • ServiceBeanMethodInvocationFactoryUtil.proceed(obj, MyClass.class, instanceMethod, arguments, new String[] {"transactionAdvice"});

      For static methods:

      • staticMethod.invoke(null, arguments);
      • ServiceBeanMethodInvocationFactoryUtil.proceed(null, MyClass.class, staticMethod, arguments, new String[] {"transactionAdvice"}); – NPE gets thrown

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              ethan.bustad Ethan Bustad (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 21 weeks, 2 days ago

                  Packages

                  Version Package