Skip to content

Commit

Permalink
Merge pull request #6260 from jamezp/WFCORE-7074
Browse files Browse the repository at this point in the history
[WFCORE-7074] Use the ModuleIdentifier.fromString() where a slot may …
  • Loading branch information
bstansberry authored Nov 27, 2024
2 parents a62fb1c + c66f017 commit 2bdbac3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static Builder of(ModuleLoader moduleLoader, String moduleName) {
private Builder(ModuleLoader moduleLoader, String moduleName) {
this.moduleLoader = moduleLoader;
//noinspection deprecation
this.identifier = ModuleIdentifier.create(moduleName);
this.identifier = ModuleIdentifier.fromString(moduleName);
}

/**
Expand Down Expand Up @@ -149,7 +149,7 @@ public String toString() {
* @param userSpecified {@code true} if this dependency was specified by the user, {@code false} if it was automatically added
*/
public ModuleDependency(final ModuleLoader moduleLoader, final String identifier, final boolean optional, final boolean export, final boolean importServices, final boolean userSpecified) {
this(moduleLoader, ModuleIdentifier.create(identifier), optional, export, importServices, userSpecified, null);
this(moduleLoader, ModuleIdentifier.fromString(identifier), optional, export, importServices, userSpecified, null);
}

/**
Expand All @@ -167,7 +167,7 @@ public ModuleDependency(final ModuleLoader moduleLoader, final String identifier
*/
@Deprecated(forRemoval = true)
public ModuleDependency(final ModuleLoader moduleLoader, final String identifier, final boolean optional, final boolean export, final boolean importServices, final boolean userSpecified, String reason) {
this(moduleLoader, ModuleIdentifier.create(identifier), optional, export, importServices, userSpecified, reason);
this(moduleLoader, ModuleIdentifier.fromString(identifier), optional, export, importServices, userSpecified, reason);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ private void installAliases(final ModuleSpecification moduleSpecification, final

ModuleLoader moduleLoader = deploymentUnit.getAttachment(Attachments.SERVICE_MODULE_LOADER);
for (final String aliasName : moduleSpecification.getModuleAliases()) {
final ModuleIdentifier alias = ModuleIdentifier.create(aliasName);
final ModuleIdentifier alias = ModuleIdentifier.fromString(aliasName);
final ServiceName moduleSpecServiceName = ServiceModuleLoader.moduleSpecServiceName(alias);
final ModuleSpec spec = ModuleSpec.buildAlias(aliasName, moduleIdentifier.getName()).create();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ public void addAliases(final Collection<ModuleIdentifier> moduleIdentifiers) {
*/
@Deprecated(forRemoval = true)
public List<ModuleIdentifier> getAliases() {
return aliases.stream().map(ModuleIdentifier::create).collect(Collectors.toList());
return aliases.stream().map(ModuleIdentifier::fromString).collect(Collectors.toList());
}

/**
Expand Down Expand Up @@ -461,7 +461,7 @@ public List<PermissionFactory> getPermissionFactories() {
*/
@Deprecated(forRemoval = true)
public Set<ModuleIdentifier> getNonexistentExcludedDependencies() {
return getFictitiousExcludedDependencies().stream().map(ModuleIdentifier::create).collect(Collectors.toSet());
return getFictitiousExcludedDependencies().stream().map(ModuleIdentifier::fromString).collect(Collectors.toSet());
}

/**
Expand Down

0 comments on commit 2bdbac3

Please sign in to comment.