RFR JDK-8066577: Cleanup and make better use of the stream API in the jrtfs code

Paul Sandoz paul.sandoz at oracle.com
Mon Aug 29 17:12:24 UTC 2016


> On 29 Aug 2016, at 09:26, Xueming Shen <xueming.shen at oracle.com> wrote:
> 
> On 8/27/16 12:57 AM, Alan Bateman wrote:
>> On 26/08/2016 17:48, Xueming Shen wrote:
>> 
>>> Hi,
>>> 
>>> This is a aged rfe from Paul's code review comments for the old code. base. The
>>> implementation has been changed lots since.  Some has gone, some has been updated
>>> accordingly. Just went through the list and here is the change set for some minor issues
>>> still present.
>>> 
>>> issue: https://bugs.openjdk.java.net/browse/JDK-8066577
>>> webrev: http://cr.openjdk.java.net/~sherman/8066577/webrev
>> You might want to re-check the synchronization in JrtDirectoryStream, it looks the next/hasNext methods are synchronizing on the Iterator instance.
>> 
>> -Alan.
> 
> 
> Hi
> 
> Webrev has been updated accordingly
> 
> http://cr.openjdk.java.net/~sherman/8066577/webrev/
> 
> (1) the iterator is to synchronize on JrtDirectoryStream.this
> 

+1


> (2) to use Collections.singleton() as Claes suggested. It appears the "singleton set" is
> 
>     better choice (light) in this case.
> 

Yes, better choice,
Paul.


More information about the core-libs-dev mailing list