DirectoryStreamFilters.newContentTypeFilter
Rémi Forax
forax at univ-mlv.fr
Wed Oct 22 15:30:27 PDT 2008
Mark Thornton a écrit :
> Rémi Forax wrote:
>> Hi Mark,
>> Because
>> 1) It's better fit with the intention of that filter, a filter that
>> works on any FileRef
>> 2) Even if in the JDK all codes use DirectoryStream.Filter<? super
>> Path>, wildcards is
>> on of the feature of Java that average dukes don't understand so
>> in their code
>> they will use DirectoryStream.Filter<Path>.
>>
> Fair enough. It is just a pity that inference only works in an
> assignment context
>
> http://www.angelikalanger.com/GenericsFAQ/FAQSections/TechnicalDetails.html#Why%20do%20temporary%20variables%20matter%20in%20case%20of%20invocation%20of%20parameterized%20methods?
>
>
> Mark
Yes, a lot of smart people think we should remove this limitation in JDK 7:
see http://tech.puredanger.com/java7#typeinference
Rémi
More information about the nio-dev
mailing list