commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David BERNARD <>
Subject [VFS] remove dependecies
Date Fri, 04 Oct 2002 17:16:02 GMT
May be a stupid suggestion but :

1. Dependence of commons-io could be remove by adding few line to

2. Dependence of excalibur-i18n could be remove by removing used of
Resource in exception. IMHO it was a bad practice,
 - the selected language is always the default locale (bad if exception
are raise on a server)
 - to provide other translation the user need to make a similar
directory structure, or to unjar, add, jar the lib.

So there isn't really internationalization. As replacement, I suggest to
 - add Exception.code as a key (like those in REZ)
 - add Exception.infos, an array of String that contains the arguments
 - set Exception.message = "Exception.code{Exception.infos[0],
Exception.infos[1], ...}"
 - provide a properties file that merged all Ressources.prop, but don't
use it in VFS only provide for user who want to humanize message.

By sample
final String message =
throw new FileSystemException( message );

throw new FileSystemException("set-attribute-not-supported.error");


final String message = REZ.getString( "list-children.error", name );
throw new FileSystemException( message, exc );

throw new FileSystemException( "list-children.error", name, exc);

And IMO, for FileType the use of Resources as constant is very

If you are OK, I could provide a patch for all those modifications.

| Contrary to popular belief, UNIX is user-friendly. It   |
| just happens to be selective on who it makes friendship |
| with.                                                   |
|                       - Richard Cook                    |

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message