RFR 4823133: RandomAccessFile.length() is not thread-safe

Vyom Tewari vyom.tewari at oracle.com
Fri Dec 11 06:46:58 UTC 2015


+nio-dev

On 12/10/2015 5:54 PM, David Holmes wrote:
> Hi Vyom,
>
> Should this be reviewed by the NIO folk? It isn't obvious whether this 
> change impacts the interaction with the associated FileChannel - see 
> also https://bugs.openjdk.java.net/browse/JDK-6371642
>
> Thanks,
> David
>
> On 10/12/2015 8:52 PM, vyom wrote:
>> Hi All,
>>
>> Please review my changes for below bug.
>>
>> Bug: JDK-4823133 : RandomAccessFile.length() is not thread-safe
>>
>> Webrev:http://cr.openjdk.java.net/~vtewari/4823133/webrev0.0/
>> <http://cr.openjdk.java.net/%7Evtewari/4823133/webrev0.0/>
>>
>> This change ensure that  length() does not temporarily changes the file
>> pointer and it will make sure that there is no race
>> condition in case of multi thread uses.
>>
>> Thanks,
>> Vyom
>>
>>
>>
>>



More information about the nio-dev mailing list