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

GsonDataFormat doesn't use given Gson instance anymore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.11.0
    • 2.11.1, 2.12.0
    • camel-gson
    • None
    • Novice

    Description

      Before 2.11.0 it was possible to configure GsonDataFormat to use an externally created and configured Gson instance. (Which was especially necessary since it was not possible to configure via GsonDataFormat.) But in 2.11.0 GsonDataFormat implements ServiceSupport which breaks this. Because doStart always creates a new Gson instance although one has been given by a constructor call.

      Probably a

      if (this.gson == null) {
        // ... old doStart body ...
      }
      

      could do in doStart method.

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            wd_dietmar Dietmar Schinnerl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: