[infinispan-dev] Configuration.clone

Vladimir Blagojevic vblagoje at redhat.com
Tue Aug 11 05:44:00 EDT 2009


I made a decision to use object serialization because Configuration is a 
really complex object now and likely to change. Field-by-field cloning 
is very brittle as it is easy to forget to clone newly added fields. But 
if we are careful.... I see that Mircea changed this to field-by-field 
clone. We should perhaps add a note for maintenance of these fields.

Cheers

On 8/4/09 2:15 PM, Manik Surtani wrote:
> Hmm, that is weird.
>
> Don't intent to point fingers or anything :) but Vladimir [1], any
> specific reason to handle clone() in this way?
>
> Cheers
> Manik
>
> [1] http://fisheye.jboss.org/browse/Infinispan/trunk/core/src/main/java/org/infinispan/config/Configuration.java?r=625
>
> On 4 Aug 2009, at 12:33, Mircea Markus wrote:
>
>    
>> Hi,
>>
>> Configuration.clone is implemented with object serialization. AFAIK
>> this
>> is not a good practice for several reasons, one of them is that all
>> the
>> objects aggregated  by Configuration must be serializable. While this
>> *might* be ok for Configuration elements within our scope (infinispan)
>> this will unnecessarily enforce the extensions (e.g.
>> <aCustomCacheStore>Configuration) to be serializable.
>>
>> Cheers,
>> Mircea
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>      
>
> --
> Manik Surtani
> manik at jboss.org
> Lead, Infinispan
> Lead, JBoss Cache
> http://www.infinispan.org
> http://www.jbosscache.org
>
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20090811/75688349/attachment-0002.html 


More information about the infinispan-dev mailing list