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

[WFCORE-7135] Remove ModuleIdentifier use in the testsuite #6322

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import org.jboss.byteman.rule.helper.Helper;
import org.jboss.modules.Module;
import org.jboss.modules.ModuleClassLoader;
import org.jboss.modules.ModuleIdentifier;
import org.jboss.modules.ModuleLoader;

/**
Expand Down Expand Up @@ -64,7 +63,7 @@ private void executeOperation(Object deploymentOperations, String operation) thr
Field instance = defaultBootModuleLoaderHolder.getDeclaredField("INSTANCE");
instance.setAccessible(true);
ModuleLoader loader = (ModuleLoader) instance.get(null);
Module module = loader.loadModule(ModuleIdentifier.fromString("org.jboss.as.deployment-scanner"));
Module module = loader.loadModule("org.jboss.as.deployment-scanner");
traceln("ServerLoaderhelper", "Module " + module.toString() + " loaded.");
ModuleClassLoader cl = module.getClassLoader();
Class modelNodeClass = cl.loadClassLocal("org.jboss.dmr.ModelNode");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package org.wildfly.core.test.standalone.mgmt.api.core;

import org.jboss.as.controller.ModuleIdentifierUtil;
import org.jboss.as.controller.PathAddress;
import org.jboss.as.controller.PathElement;
import org.jboss.as.controller.operations.common.Util;
Expand All @@ -13,7 +14,6 @@
import org.jboss.modules.LocalModuleLoader;
import org.jboss.modules.Module;
import org.jboss.modules.ModuleDependencySpec;
import org.jboss.modules.ModuleIdentifier;
import org.jboss.modules.ModuleLoadException;
import org.junit.Assert;
import org.junit.Test;
Expand Down Expand Up @@ -101,7 +101,7 @@ public void testModuleInfo() throws Exception {
}*/

// load module.xml
ModuleIdentifier identifier = ModuleIdentifier.fromString(TARGET_MODULE_NAME + ":main");
String identifier = ModuleIdentifierUtil.canonicalModuleIdentifier(TARGET_MODULE_NAME + ":main");
Module module = loadModule(identifier);

// run module-info operation
Expand Down Expand Up @@ -147,7 +147,7 @@ public void testModuleInfo() throws Exception {
Assert.assertTrue(module.getClassLoader().getLocalPaths().containsAll(paths));
}

private Module loadModule(ModuleIdentifier identifier) throws IOException, ModuleLoadException {
private Module loadModule(String identifier) throws IOException, ModuleLoadException {
File[] roots = new File[]{new File(LAYERS_BASE)};
LocalModuleLoader moduleLoader = new LocalModuleLoader(roots);
return moduleLoader.loadModule(identifier);
Expand Down
Loading