Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6646

Support static method calls on OGNL expressions

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: 2.16.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      In OgnlInvokeProcessor, we currently don't support static method calls as we always require a bean instance.

      See this block of code in 2.10.3, starting on OgnlInvokeProcessor:247:

      // loop and invoke each method
      Object beanToCall = beanHolder.getBean();
      // there must be a bean to call with, we currently does not support OGNL expressions on using purely static methods
      if (beanToCall == null) {
          throw new IllegalArgumentException("Bean instance is null. OGNL bean expressions requires bean instances.");
      }
      

      Add support for these cases, especially handy if you use the method() expression frequently.

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              raulvk Raúl Kripalani
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: