Skip to content

Commit f7d1f96

Browse files
committed
Improve error message when JarFile encounters a compressed nested jar
Closes gh-1643
1 parent 79deed7 commit f7d1f96

File tree

1 file changed

+4
-2
lines changed
  • spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar

1 file changed

+4
-2
lines changed

spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarFile.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,10 @@ public AsciiBytes apply(AsciiBytes name, JarEntryData entryData) {
375375
private JarFile createJarFileFromFileEntry(JarEntryData sourceEntry)
376376
throws IOException {
377377
if (sourceEntry.getMethod() != ZipEntry.STORED) {
378-
throw new IllegalStateException("Unable to open nested compressed entry "
379-
+ sourceEntry.getName());
378+
throw new IllegalStateException("Unable to open nested entry '"
379+
+ sourceEntry.getName() + "'. It has been compressed and nested "
380+
+ "jar files must be stored without compression. Please check the "
381+
+ "mechanism used to create your executable jar file");
380382
}
381383
return new JarFile(this.rootFile, this.pathFromRoot + "!/"
382384
+ sourceEntry.getName(), sourceEntry.getData());

0 commit comments

Comments
 (0)