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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user