commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Moran Ben-David" <mo...@place-base.com>
Subject [configuration] PropertiesConfiguration doesn't throw exception when path is a directory
Date Wed, 31 Aug 2005 17:41:58 GMT
Hi all,

I recently noticed that when I use a string which is a directory to create a
PropertiesConfiguration, no exception is thrown.  Is this by intention?

For example, I do

<code>
PropertiesConfiguration temp = 
	new PropertiesConfiguration("c:/baddirectory");
</code>

I get the expected

<code>
org.apache.commons.configuration.ConfigurationException: Cannot locate
configuration source baddirectory
</code>

However, when I do 

PropertiesConfiguration temp2 = new PropertiesConfiguration("c:/windows");

I don't get any exception.  Is this a desired behaviour?  The difference
between "baddirectory" and "windows" is that the former doesn't exist and
the latter does.

Thanks,
Moran


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


Mime
View raw message