As Charlie points out, we do still want to complain if you ask to load

inherited properties for a path that matches no properties files at all.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2539 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2009-03-16 21:14:41 +00:00
parent 86ab90e042
commit 44ad7fce50
+8 -1
View File
@@ -247,6 +247,9 @@ public class ConfigUtil
* Like {@link #loadInheritedProperties(String,ClassLoader)} but the properties are loaded into
* the supplied properties object. Properties that already exist in the supplied object will
* be overwritten by the loaded properties where they have the same key.
*
* @exception FileNotFoundException thrown if no properties files are found for the specified
* path.
*/
public static void loadInheritedProperties (String path, ClassLoader loader, Properties target)
throws IOException
@@ -276,7 +279,11 @@ public class ConfigUtil
PropRecord root = null, crown = null;
HashMap<String,PropRecord> map = null;
if (rsrcs.size() == 1) {
if (rsrcs.size() == 0) {
// if we found no resources in our enumerations, complain
throw new FileNotFoundException(path);
} else if (rsrcs.size() == 1) {
// parse the metadata for our only properties file
root = parseMetaData(path, rsrcs.get(0));