You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Dietmar Schinnerl (JIRA)" <ji...@apache.org> on 2013/05/16 10:49:15 UTC

[jira] [Updated] (CAMEL-6369) GsonDataFormat doesn't use given Gson instance anymore

     [ https://issues.apache.org/jira/browse/CAMEL-6369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dietmar Schinnerl updated CAMEL-6369:
-------------------------------------

    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 

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

could do in doStart method.


  was:
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.


    
> GsonDataFormat doesn't use given Gson instance anymore
> ------------------------------------------------------
>
>                 Key: CAMEL-6369
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6369
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-gson
>    Affects Versions: 2.11.0
>            Reporter: Dietmar Schinnerl
>            Priority: Minor
>
> 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 
> {code}
> if (this.gson == null) {
>   // ... old doStart body ...
> }
> {code}
> could do in doStart method.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira