Skip to content

Commit 1e69bc9

Browse files
committed
Rename singleHop field.
1 parent 9635ba5 commit 1e69bc9

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public static final class JlinkConfiguration {
148148
private final Set<String> modules;
149149
private final ModuleFinder finder;
150150
private final boolean linkFromRuntimeImage;
151-
private final boolean singleHop;
151+
private final boolean ignoreModifiedRuntime;
152152

153153
/**
154154
* jlink configuration,
@@ -161,12 +161,12 @@ public JlinkConfiguration(Path output,
161161
Set<String> modules,
162162
ModuleFinder finder,
163163
boolean linkFromRuntimeImage,
164-
boolean singleHop) {
164+
boolean ignoreModifiedRuntime) {
165165
this.output = output;
166166
this.modules = Objects.requireNonNull(modules);
167167
this.finder = finder;
168168
this.linkFromRuntimeImage = linkFromRuntimeImage;
169-
this.singleHop = singleHop;
169+
this.ignoreModifiedRuntime = ignoreModifiedRuntime;
170170
}
171171

172172
/**
@@ -195,8 +195,8 @@ public boolean linkFromRuntimeImage() {
195195
return linkFromRuntimeImage;
196196
}
197197

198-
public boolean singleHop() {
199-
return singleHop;
198+
public boolean ignoreModifiedRuntime() {
199+
return ignoreModifiedRuntime;
200200
}
201201

202202
/**

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ private JlinkTask(boolean isScratch) {
200200
task.options.ignoreSigning = true;
201201
}, "--ignore-signing-information"),
202202
new Option<JlinkTask>(false, (task, opt, arg) -> {
203-
task.options.runImageSingleHop = false;
203+
task.options.ignoreModifiedRuntime = true;
204204
}, true, "--ignore-modified-runtime"),
205205
};
206206

@@ -243,7 +243,7 @@ static class OptionsValues {
243243
boolean ignoreSigning = false;
244244
boolean bindServices = false;
245245
boolean suggestProviders = false;
246-
boolean runImageSingleHop = true;
246+
boolean ignoreModifiedRuntime = false;
247247
}
248248

249249
public static final String OPTIONS_RESOURCE = "jdk/tools/jlink/internal/options";
@@ -426,7 +426,7 @@ private JlinkConfiguration initJlinkConfig() throws BadArgs {
426426
roots,
427427
finder,
428428
options.modulePath.isEmpty(),
429-
options.runImageSingleHop);
429+
options.ignoreModifiedRuntime);
430430
}
431431

432432
private void createImage(JlinkConfiguration config) throws Exception {
@@ -669,7 +669,7 @@ private static ImageHelper createImageProvider(JlinkConfiguration config,
669669
.orElse(Runtime.version());
670670

671671
Set<Archive> archives = mods.entrySet().stream()
672-
.map(e -> config.linkFromRuntimeImage() ? new JRTArchive(e.getKey(), e.getValue(), config.singleHop())
672+
.map(e -> config.linkFromRuntimeImage() ? new JRTArchive(e.getKey(), e.getValue(), !config.ignoreModifiedRuntime())
673673
: newArchive(e.getKey(), e.getValue(), version, ignoreSigning))
674674
.collect(Collectors.toSet());
675675

0 commit comments

Comments
 (0)