[concurrency-interest] Primitives wrappers and visibility problems

Ernst, Matthias matthias.ernst at coremedia.com
Wed Aug 23 05:52:16 EDT 2006

> I have another question about visibility problems. Someone suggested
> to me that the primitve wrappers (like Integer) don't use a final
> field for the primitive they contain. This would make them not
> threadsafe. Is this correct?

I was about to write a lengthy response. It turns out that someone's
suggestion is just wrong:

java.lang.Integer at Java 1.5.0_07:
     * The value of the <code>Integer</code>.
     * @serial
    private final int value;


More information about the Concurrency-interest mailing list