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

Simple expression does not find method toString()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.8.0
    • 2.8.3, 2.9.0
    • camel-core
    • None
    • camel 2.8.0

    • Unknown

    Description

      In a route builder, we have a log definition:

      from("direct:testSimple")
      .log("${body.toString}");

      The body contains an object, that implements a public toString() method. But the problem is, that the simple-expression does not find the method toString() and route processing stops without throwing an exception.

      The funny thing is, that when we just rename the method, e.g. toInfoString(), then it works:
      from("direct:testSimple")
      .log("${body.toInfoString}");

      Why does simple expression have a problem with a method named "toString"?

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            romanstumm Roman Stumm
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: