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

Simple Language: Invoke clone() method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.14.2
    • 3.14.4, 3.18.0
    • camel-core
    • None
    • Camel Version: 3.14.2
      Windows 10
      AdoptOpenJDK\jdk-8.0.265.01-hotspot and AdoptOpenJDK\jdk-11.0.8+10

    • Unknown

    Description

      I am getting an exception if the clone method is invoked on an object (which has an implemented clone method) via simple language:
      org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to invoke method: clone() on null due to:

      • org.apache.camel.component.bean.MethodNotFoundException: Method with name: clone() not found on bean ...

      Example code:
      ...
      .to("language://simple:${body.clone()}")
      ...
      For full example see attachment:
      InvokeCloneTest.java

      Same code worked with Camel 2.X

      Attachments

        1. InvokeCloneTest.java
          9 kB
          Steffen Brauns

        Activity

          People

            davsclaus Claus Ibsen
            sbrauns Steffen Brauns
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: