6647361: use Unsafe.put*Volatile methods to set final fields during default deserialization

David M. Lloyd david.lloyd at redhat.com
Mon Nov 22 15:01:52 UTC 2010

On 11/22/2010 07:52 AM, Alan Bateman wrote:
> This is a patch to default deserialization so that it uses
> volatile-write when setting final fields:
> http://cr.openjdk.java.net/~alanb/6647361/webrev/

Please don't go farther down the path of "only JDK/proprietary classes 
can properly deserialize".  Bad enough that proper implementation of the 
spec requires using sun.reflect.ReflectionFactory.  Requiring Unsafe too 
would just be irritating.

How about putting this stuff on a public (if privileged) API *first*?


More information about the core-libs-dev mailing list