[concurrency-interest] File object is not immutable?

Ruslan Cheremin cheremin at gmail.com
Wed Feb 15 15:07:34 EST 2012


You mean I should CC core-libs-dev at openjdk.java.net ?

2012/2/15 Alan Bateman <Alan.Bateman at oracle.com>:
> On 15/02/2012 15:00, Ruslan Cheremin wrote:
>>
>> I was very surprised to see that field "path" in java.io.File is not
>> final. I was treating File object in concurrency area is something
>> like String --  fully immutable, and completely thread-safe, even
>> data-race safe.
>>
> It probably wasn't made final because of serialization. It's something to
> bring up on core-libs-dev.
>
> -Alan



More information about the Concurrency-interest mailing list