Merge branch '2.3.x'

Closes gh-23000
This commit is contained in:
Scott Frederick
2020-08-18 17:07:25 -05:00
3 changed files with 22 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ import java.util.Map;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import org.springframework.util.Assert;
import org.springframework.util.StreamUtils;
import org.springframework.util.StringUtils;
@@ -66,6 +67,8 @@ class ExtractCommand extends Command {
}
try (ZipInputStream zip = new ZipInputStream(new FileInputStream(this.context.getJarFile()))) {
ZipEntry entry = zip.getNextEntry();
Assert.state(entry != null, "File '" + this.context.getJarFile().toString()
+ "' is not compatible with layertools; ensure jar file is valid and launch script is not enabled");
while (entry != null) {
if (!entry.isDirectory()) {
String layer = this.layers.getLayer(entry);