From a85e99790b3f02b8b60180e9b3935901bf01045d Mon Sep 17 00:00:00 2001 From: Piyal Ahmed Date: Wed, 24 Jan 2024 16:34:16 +0600 Subject: [PATCH] Fix NestedJarFile constructor javadoc See gh-39285 --- .../boot/loader/jar/NestedJarFile.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/NestedJarFile.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/NestedJarFile.java index 1c2fea69a40..6168202950e 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/NestedJarFile.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/NestedJarFile.java @@ -101,8 +101,10 @@ public class NestedJarFile extends JarFile { * Creates a new {@link NestedJarFile} instance to read from the specific * {@code File}. * @param file the jar file to be opened for reading - * @param nestedEntryName the nested entry name to open or {@code null} + * @param nestedEntryName the nested entry name to open * @throws IOException on I/O error + * @throws IllegalArgumentException if {@code nestedEntryName} is {@code null} or + * empty */ public NestedJarFile(File file, String nestedEntryName) throws IOException { this(file, nestedEntryName, null, true, Cleaner.instance); @@ -112,9 +114,11 @@ public class NestedJarFile extends JarFile { * Creates a new {@link NestedJarFile} instance to read from the specific * {@code File}. * @param file the jar file to be opened for reading - * @param nestedEntryName the nested entry name to open or {@code null} + * @param nestedEntryName the nested entry name to open * @param version the release version to use when opening a multi-release jar * @throws IOException on I/O error + * @throws IllegalArgumentException if {@code nestedEntryName} is {@code null} or + * empty */ public NestedJarFile(File file, String nestedEntryName, Runtime.Version version) throws IOException { this(file, nestedEntryName, version, true, Cleaner.instance); @@ -124,11 +128,13 @@ public class NestedJarFile extends JarFile { * Creates a new {@link NestedJarFile} instance to read from the specific * {@code File}. * @param file the jar file to be opened for reading - * @param nestedEntryName the nested entry name to open or {@code null} + * @param nestedEntryName the nested entry name to open * @param version the release version to use when opening a multi-release jar * @param onlyNestedJars if only nested jars should be opened * @param cleaner the cleaner used to release resources * @throws IOException on I/O error + * @throws IllegalArgumentException if {@code nestedEntryName} is {@code null} or + * empty */ NestedJarFile(File file, String nestedEntryName, Runtime.Version version, boolean onlyNestedJars, Cleaner cleaner) throws IOException {