shau-lok / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

Make GsonBuilder cloneable #314

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Since it it mutable, GsonBuilder should also be cloneable.

Original issue reported on code.google.com by jeremiah...@gmail.com on 16 Apr 2011 at 10:01

GoogleCodeExporter commented 9 years ago
Why are you cloning a GsonBuilder? I'm marking this as WontFix only because we 
don't expect GsonBuilder instances to survive beyond a single method call.

Original comment by limpbizkit on 29 Dec 2011 at 6:01

GoogleCodeExporter commented 9 years ago
I needed this to create a "default" builder that can be personalized by 
a-priori unknown users of my service.
I wanted to be able to create the default instance and then pass around clones 
of it.

I worked around it by having a method dedicated to the creation of that default 
builder. It is however not optimal if you want to have multiple layers of such 
"services", each tuning their builder for their very needs.

Original comment by jeremiah...@gmail.com on 29 Dec 2011 at 6:02