if -Dconfig.resource resource name starts with "/", drop the "/"

this is for compatibility with previous behavior.
This commit is contained in:
Havoc Pennington 2012-03-02 10:14:36 -05:00
parent f497419970
commit 4bee83c8a8

View File

@ -186,6 +186,8 @@ public final class ConfigFactory {
+ "'; don't know which one to use!");
} else {
if (resource != null) {
if (resource.startsWith("/"))
resource = resource.substring(1);
// this deliberately does not parseResourcesAnySyntax; if
// people want that they can use an include statement.
return load(loader, parseResources(loader, resource));