Skip to content

Commit

Permalink
fix(ActionScopeValidation): use action scope in class (#1303)
Browse files Browse the repository at this point in the history
Signed-off-by: TTtie <[email protected]>
  • Loading branch information
TTtie authored Feb 29, 2024
1 parent 5950b9a commit 2708649
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ private ActionScopeValidation(Class<?> scope) {

@Override
public void validate(ActionDefinition<?> definition, Node node) throws InvalidXMLException {
Class<?> scope = definition.getScope();
if (!scope.isAssignableFrom(this.scope))
Class<?> definitionScope = definition.getScope();
if (!definitionScope.isAssignableFrom(scope))
throw new InvalidXMLException(
"Wrong action scope, got "
+ scope.getSimpleName()
+ definitionScope.getSimpleName()
+ " but expected "
+ scope.getSimpleName(),
node);
Expand Down

0 comments on commit 2708649

Please sign in to comment.