commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <ma...@ops.co.at>
Subject RE: svn commit: r797267 - in /commons/proper/configuration/trunk/src/java/org/apache/commons/configuration: FileSystem.java VFSFileSystem.java
Date Fri, 24 Jul 2009 05:48:59 GMT
Hi!

 
> Modified:
> commons/proper/configuration/trunk/src/java/org/apache/commons/configur
> ation/VFSFileSystem.java
 
> -    private FileSystemOptions setHttpOptions(FileSystemOptions opts,
> Map map)
> +    private void setProperty(FileSystemConfigBuilder builder,
> FileSystemOptions options,
> +                             String key, Object value)
>      {
> -        setDefaultOptions(opts, map);
> +        String methodName = "set" + key.substring(0,1).toUpperCase() +
> key.substring(1);
> +        Class[] paramTypes = new Class[2];
> +        paramTypes[0] = FileSystemOptions.class;
> +        paramTypes[1] = value.getClass();

Hmmm ... I am not quite sure of the rest of the code, but did you see the DelegatingFileSystemOptionsBuilder
[1]?

It also sets the configuration using reflection based on just strings.


Ciao,
Mario


[1] http://commons.apache.org/vfs/apidocs/org/apache/commons/vfs/util/DelegatingFileSystemOptionsBuilder.html

Mime
View raw message