EricWittmann opened a new pull request #5834:
URL: https://github.com/apache/camel/pull/5834


   …ith KafkaConfiguration:copy()
   
   OK so I'm not sure if this is the right thing.  Please review the JIRA issue 
for more details.  I've made a change based on what I think the semantics of 
`copy()` should be.  I don't know enough about Kafka or Kafka-camel to know if 
this is right.
   
   But ultimately the issue is that the `additionalProperties` map is not 
cloned (the default impl. of Java's `clone()` only does a shallow copy).  So as 
a result a call to `copy()` will create a second instance of 
`KafkaConfiguration` that shares the same `HashMap` for the 
`additionalProperties` field.
   
   Making a copy of that field seems like the solution.
   
   My concern is over the fact that the config is copied when creating a second 
connector at all - I would have expected a new empty configuration to be used 
rather than a clone of an existing one (in the use case documented in the Jira).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to