commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <ebo...@micropole-univers.com>
Subject Re: [configuration] SubsetConfiguration
Date Fri, 05 Mar 2004 13:52:09 GMT
Jörg Schaible wrote:

> Sure, but here is the compatibility issue:
> 
> Configuration config = new BaseConfiguration();
> Configuration subset = config.subset("database");
> if(subset == null) {
> 	// continue with limited functionality
> } else {
> 	jdbc.connect(subset.getProperty("database").toString());
> }
> 
> ===> an existing app may just fail now with NPE

The workaround here is to change the condition "subset == null" into 
"subset.isEmpty()".

It will break existing code expecting a null value, but I think it's 
still time to make such changes with a minor compatibility impact and 
clean the API before the 1.0 release.

Emmanuel Bourg



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


Mime
View raw message