Skip to content

Commit ccc72d2

Browse files
committed
[WFLY-20289] Remove use of ModuleIdentifier from ModuleIdentifierValidatorBuilder
1 parent 6607f95 commit ccc72d2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

clustering/common/src/main/java/org/jboss/as/clustering/controller/validation/ModuleIdentifierValidatorBuilder.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@
55

66
package org.jboss.as.clustering.controller.validation;
77

8+
import org.jboss.as.controller.ModuleIdentifierUtil;
89
import org.jboss.as.controller.OperationFailedException;
910
import org.jboss.as.controller.operations.validation.ModelTypeValidator;
1011
import org.jboss.as.controller.operations.validation.ParameterValidator;
1112
import org.jboss.dmr.ModelNode;
1213
import org.jboss.dmr.ModelType;
1314

1415
/**
15-
* {@link ParameterValidatorBuilder} that builds a validator that validates that a given value is a valid {@link ModuleIdentifier}.
16+
* {@link ParameterValidatorBuilder} that builds a validator that validates that a given value is a valid module
17+
* name + optional slot that can be {@link ModuleIdentifierUtil#canonicalModuleIdentifier(String) canonicalized}.
18+
*
1619
* @author Paul Ferraro
1720
*/
1821
public class ModuleIdentifierValidatorBuilder extends AbstractParameterValidatorBuilder {
@@ -35,7 +38,7 @@ public void validateParameter(String parameterName, ModelNode value) throws Oper
3538
if (value.isDefined()) {
3639
String module = value.asString();
3740
try {
38-
org.jboss.modules.ModuleIdentifier.fromString(module);
41+
ModuleIdentifierUtil.canonicalModuleIdentifier(module);
3942
} catch (IllegalArgumentException e) {
4043
throw new OperationFailedException(e.getMessage() + ": " + module, e);
4144
}

0 commit comments

Comments
 (0)