Reserve layer names for future use

Update layered jar support so that the name `ext` and any name
starting `springboot` are reserved.

See gh-19767
This commit is contained in:
Phillip Webb
2020-01-22 01:07:41 -08:00
parent 3af4930f75
commit d5a70688cb
2 changed files with 12 additions and 0 deletions

View File

@@ -41,6 +41,8 @@ public class Layer {
public Layer(String name) {
Assert.hasText(name, "Name must not be empty");
Assert.isTrue(PATTERN.matcher(name).matches(), "Malformed layer name '" + name + "'");
Assert.isTrue(!name.equalsIgnoreCase("ext") && !name.toLowerCase().startsWith("springboot"),
"Layer name '" + name + "' is reserved");
this.name = name;
}