Skip to content

Commit

Permalink
Merge pull request wildfly#18436 from soul2zimate/WFLY-20008-main
Browse files Browse the repository at this point in the history
[WFLY-20008] Remove all non-breaking uses of ModuleIdentifier in Pojo Subsystem
  • Loading branch information
bstansberry authored Dec 17, 2024
2 parents beee6c6 + a39dbf6 commit 73d371d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.jboss.as.server.deployment.module.ModuleDependency;
import org.jboss.as.server.deployment.module.ModuleSpecification;
import org.jboss.modules.Module;
import org.jboss.modules.ModuleIdentifier;
import org.jboss.modules.ModuleLoader;
import org.jboss.modules.filter.PathFilter;
import org.jboss.modules.filter.PathFilters;
Expand All @@ -29,7 +28,7 @@
*/
public class KernelDeploymentModuleProcessor implements DeploymentUnitProcessor {

private ModuleIdentifier POJO_MODULE = ModuleIdentifier.create("org.jboss.as.pojo");
private final String POJO_MODULE = "org.jboss.as.pojo";

/**
* Add POJO module if we have any bean factories.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import org.jboss.as.pojo.service.BeanInfo;
import org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex;
import org.jboss.modules.Module;
import org.jboss.modules.ModuleIdentifier;
import org.jboss.msc.inject.Injector;
import org.jboss.msc.service.ServiceName;

Expand Down Expand Up @@ -55,7 +54,7 @@ public interface ConfigVisitor {
* @param identifier the module identifier
* @return loaded module
*/
Module loadModule(ModuleIdentifier identifier);
Module loadModule(String identifier);

/**
* Get reflection index.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import org.jboss.as.pojo.service.BeanInfo;
import org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex;
import org.jboss.modules.Module;
import org.jboss.modules.ModuleIdentifier;
import org.jboss.msc.inject.Injector;
import org.jboss.msc.service.ServiceBuilder;
import org.jboss.msc.service.ServiceName;
Expand Down Expand Up @@ -50,7 +49,7 @@ public Module getModule() {
}

@Override
public Module loadModule(ModuleIdentifier identifier) {
public Module loadModule(String identifier) {
try {
return module.getModule(identifier);
} catch (Throwable t) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;

import org.jboss.as.controller.ModuleIdentifierUtil;
import org.jboss.as.pojo.BeanState;
import org.jboss.as.pojo.ParseResult;
import org.jboss.as.pojo.logging.PojoLogger;
Expand Down Expand Up @@ -362,7 +363,7 @@ private ModuleConfig parseModuleConfig(final XMLExtendedStreamReader reader) thr

switch (attribute) {
case NAME:
moduleConfig.setModuleName(attributeValue);
moduleConfig.setModuleName(ModuleIdentifierUtil.canonicalModuleIdentifier(attributeValue));
break;
default:
throw unexpectedAttribute(reader, i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void visit(ConfigVisitor visitor) {
ServiceName serviceName = ServiceModuleLoader.moduleServiceName(identifier);
visitor.addDependency(serviceName, getInjectedModule());
} else {
Module dm = visitor.loadModule(identifier);
Module dm = visitor.loadModule(moduleName);
getInjectedModule().setValue(() -> dm);
}
} else {
Expand Down

0 comments on commit 73d371d

Please sign in to comment.