Skip to content

Commit f55bb85

Browse files
committed
Mandy's feedback
1 parent d2c011e commit f55bb85

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JRTArchive.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ public Stream<Entry> entries() {
127127
collectFiles();
128128
} catch (IOException e) {
129129
throw new UncheckedIOException(e);
130-
} catch (RuntimeImageLinkException e) {
131-
// populate modified files exception
132-
throw e;
133130
}
134131
return files.stream().map(JRTFile::toEntry);
135132
}

src/jdk.jlink/share/classes/jdk/tools/jlink/internal/runtimelink/RuntimeImageLinkException.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
package jdk.tools.jlink.internal.runtimelink;
2727

28+
import java.util.Objects;
29+
2830
/**
2931
* Exception thrown when linking from the run-time image
3032
*/
@@ -41,8 +43,8 @@ public static enum Reason {
4143
private final Reason reason;
4244

4345
public RuntimeImageLinkException(String file, Reason reason) {
44-
this.file = file;
45-
this.reason = reason;
46+
this.file = Objects.requireNonNull(file);
47+
this.reason = Objects.requireNonNull(reason);
4648
}
4749

4850
public String getFile() {

src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ err.runtime.link.not.linkable.runtime=This JDK does not support linking from the
123123
err.runtime.link.jdk.jlink.prohibited=This JDK does not contain packaged modules\
124124
\ and cannot be used to create another image with the jdk.jlink module
125125
err.runtime.link.packaged.mods=This JDK has no packaged modules.\
126-
\ --keep-packaged-modules is not supported.
126+
\ --keep-packaged-modules is not supported
127127
err.runtime.link.modified.file={0} has been modified
128128
err.runtime.link.patched.module=File {0} not found in the modules image.\
129129
\ --patch-module is not supported when linking from the run-time image

0 commit comments

Comments
 (0)