mirror of
https://github.com/lightbend/config.git
synced 2025-02-23 01:30:34 +08:00
if -Dconfig.resource resource name starts with "/", drop the "/"
this is for compatibility with previous behavior.
This commit is contained in:
parent
f497419970
commit
4bee83c8a8
@ -186,6 +186,8 @@ public final class ConfigFactory {
|
|||||||
+ "'; don't know which one to use!");
|
+ "'; don't know which one to use!");
|
||||||
} else {
|
} else {
|
||||||
if (resource != null) {
|
if (resource != null) {
|
||||||
|
if (resource.startsWith("/"))
|
||||||
|
resource = resource.substring(1);
|
||||||
// this deliberately does not parseResourcesAnySyntax; if
|
// this deliberately does not parseResourcesAnySyntax; if
|
||||||
// people want that they can use an include statement.
|
// people want that they can use an include statement.
|
||||||
return load(loader, parseResources(loader, resource));
|
return load(loader, parseResources(loader, resource));
|
||||||
|
Loading…
Reference in New Issue
Block a user