seasonouc / protostuff

Automatically exported from code.google.com/p/protostuff
Apache License 2.0
0 stars 0 forks source link

Add runtime option to always use the constructor from sun reflection factory #93

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
-Dprotostuff.runtime.always_use_sun_reflection_factory=true

If true, the constructor will always be obtained from 
ReflectionFactory.newConstructorFromSerialization.

Disabled by default, which means that if the pojo has a no-args constructor, 
that will be used instead.

Enable this if you intend to avoid deserializing objects whose no-args 
constructor 
initializes (unwanted) internal state.  This applies to complex/framework 
objects.

If you intend to fill default field values using your default constructor, 
leave this disabled. This normally applies to java beans/data objects.

Original issue reported on code.google.com by david.yu...@gmail.com on 5 Nov 2011 at 5:02

GoogleCodeExporter commented 8 years ago
@rev 1426

Original comment by david.yu...@gmail.com on 5 Nov 2011 at 5:04