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

Support static method calls on OGNL expressions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • None
    • 2.16.0
    • camel-core
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: