Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8274425: Remove unused Modules.extraLimitMods #5628

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -52,7 +52,6 @@
import javax.tools.StandardLocation;

import com.sun.source.tree.ModuleTree.ModuleKind;
import com.sun.tools.javac.code.ClassFinder;
import com.sun.tools.javac.code.DeferredLintHandler;
import com.sun.tools.javac.code.Directive;
import com.sun.tools.javac.code.Directive.ExportsDirective;
@@ -163,7 +162,6 @@
private final String addModsOpt;
private final Set<String> extraAddMods = new HashSet<>();
private final String limitModsOpt;
private final Set<String> extraLimitMods = new HashSet<>();
private final String moduleVersionOpt;

private final boolean lintOptions;
@@ -1223,18 +1221,13 @@ private void setupAllModules() {

Set<ModuleSymbol> observable;

if (limitModsOpt == null && extraLimitMods.isEmpty()) {
if (limitModsOpt == null) {
observable = null;
} else {
Set<ModuleSymbol> limitMods = new HashSet<>();
if (limitModsOpt != null) {
for (String limit : limitModsOpt.split(",")) {
if (!isValidName(limit))
continue;
limitMods.add(syms.enterModule(names.fromString(limit)));
}
}
for (String limit : extraLimitMods) {
for (String limit : limitModsOpt.split(",")) {
if (!isValidName(limit))
continue;
limitMods.add(syms.enterModule(names.fromString(limit)));
}
observable = computeTransitiveClosure(limitMods, rootModules, null);