commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [VFS] Generics fixes
Date Mon, 08 Nov 2010 09:36:21 GMT
On 8 November 2010 08:49, Jörg Schaible <joerg.schaible@gmx.de> wrote:
> sebb wrote:
>
>> Most of the generics fixes have now been done.
>>
>> There are still a few raw Class references; most of these can be fixed
>> if DefaultFileSystemConfigBuilder.getConfigClass() is changed to
>> return a FileSystem [1]
>>
>> Can anyone else confirm that this is a sensible change?
>>
>> [1] https://issues.apache.org/jira/browse/VFS-334
>
> No. We use an implementation of FileSystemConfigBuilder that does also not
> implement FileSystem to introduce more global configuration parameters.

So? None of the FileSystemConfigBuilder classes currently implement FileSystem.

> What you can do is:
>
> protected Class<? extends FileSystemConfigBuilder> getConfigClass();

No, that won't work, because all the other getConfig() methods return
subclasses of FileSystem.

The only solution then would be to use Class<?> throughout.

All I'm suggesting is changing the return class from
DefaultFileSystemConfigBuilder.getConfigClass() to (say)
FileSystem.class.

The FileSystemConfigBuilder subclass getConfig() methods are not there
because they implement the FileSystem interface, they implement the
abstract method in FileSystemComfigBuilder.

> - Jörg
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message