Skip to content

Commit

Permalink
Naming fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jerboaa committed Dec 12, 2024
1 parent 73a909e commit c9643d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,14 @@ private JlinkConfiguration initJlinkConfig() throws BadArgs {

// Sanity check version if we use JMODs
if (!isLinkFromRuntime) {
checkVersion(finder);
checkJavaBaseVersion(finder);
}

// Determine the roots set
Set<String> roots = new HashSet<>();
for (String mod : options.addMods) {
if (mod.equals(ALL_MODULE_PATH)) {
ModuleFinder mf = limitFinder(finder, options.limitMods,
ModuleFinder mf = newLimitedFinder(finder, options.limitMods,
Set.of());
mf.findAll()
.stream()
Expand All @@ -430,7 +430,7 @@ private JlinkConfiguration initJlinkConfig() throws BadArgs {
roots.add(mod);
}
}
finder = limitFinder(finder, options.limitMods, roots);
finder = newLimitedFinder(finder, options.limitMods, roots);

// --keep-packaged-modules doesn't make sense as we are not linking
// from packaged modules to begin with.
Expand Down Expand Up @@ -497,7 +497,7 @@ public static Path getDefaultModulePath() {
* specified in {@code limitMods} plus other modules specified in the
* {@code roots} set.
*/
public static ModuleFinder limitFinder(ModuleFinder finder,
public static ModuleFinder newLimitedFinder(ModuleFinder finder,
Set<String> limitMods,
Set<String> roots) {
// if limitMods is specified then limit the universe
Expand Down Expand Up @@ -548,7 +548,7 @@ public Set<ModuleReference> findAll() {
* version or the java.base version is not the same as the current runtime's
* version.
*/
private static void checkVersion(ModuleFinder finder) {
private static void checkJavaBaseVersion(ModuleFinder finder) {
assert finder.find("java.base").isPresent();

// use the version of java.base module, if present, as
Expand Down
5 changes: 4 additions & 1 deletion test/jdk/tools/jlink/IntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ private static void test() throws Exception {
boolean linkFromRuntime = false;
JlinkConfiguration config = new Jlink.JlinkConfiguration(output,
mods,
JlinkTask.limitFinder(JlinkTask.newModuleFinder(modulePaths), limits, mods), linkFromRuntime, false, false);
JlinkTask.newLimitedFinder(JlinkTask.newModuleFinder(modulePaths), limits, mods),
linkFromRuntime,
false /* ignore modified runtime */,
false /* generate run-time image */);

List<Plugin> lst = new ArrayList<>();

Expand Down

0 comments on commit c9643d3

Please sign in to comment.