Skip to content

Commit

Permalink
[WFCORE-6503]: Failing if unexisting attribute is used
Browse files Browse the repository at this point in the history
Signed-off-by: Emmanuel Hugonnet <[email protected]>
  • Loading branch information
ehsavoie committed Mar 1, 2024
1 parent 5f3fbd9 commit fd8e69e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3744,7 +3744,7 @@ OperationFailedRuntimeException capabilityAlreadyRegisteredInContext(String capa
@Message(id = 501, value = "An invalid UUID string '%s' was found at '%s'. A new value will be generated.")
void uuidNotValid(String corruptedUuid, String path);

@Message(id = 502, value = "No child resource called %s could be found at address %s'.")
@Message(id = 502, value = "No child resource called '%s' could be found at address '%s'.")
IllegalArgumentException noChildResource(String name, String address);

@Message(id = 503, value = "Failed to publish configuration, because the remote name %s is not valid.")
Expand All @@ -3756,9 +3756,13 @@ OperationFailedRuntimeException capabilityAlreadyRegisteredInContext(String capa
@Message(id = 505, value = "Unsuported deployment yaml file %s with attributes %s")
IllegalArgumentException unsupportedDeployment(String deployment, Set<String> attribues);

@Message(id = 506, value = "The yaml element \"%s\" and its sub-elements are ignored.")
@Message(id = 506, value = "The yaml element '%s' and its sub-elements are ignored.")
String ignoreYamlElement(String element);

@Message(id = NONE, value = "Thus ignoring element \"%s\".")
@Message(id = NONE, value = " Thus ignoring element '%s'.")
String ignoreYamlSubElement(String element);

@Message(id = 507, value = "No attribute called '%s' is defined at address '%s'.")
IllegalArgumentException noAttributeDefined(String name, String address);

}
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,12 @@ private void processResource(PathAddress parentAddress, Map<String, Object> yaml
} else {
if (value != null && resourceRegistration.getAttributeNames(PathAddress.EMPTY_ADDRESS).contains(name)) {
//we are processing an attribute:
MGMT_OP_LOGGER.debugf("We are processing the attribute %s for address %s", name, address.getParent().toCLIStyleString());
MGMT_OP_LOGGER.debugf("We are processing the attribute %s for address %s", name, parentAddress.toCLIStyleString());
processAttribute(parentAddress, rootRegistration, name, value, postExtensionOps, xmlOperations);
} else if (value == null) {
MGMT_OP_LOGGER.noAttributeSetForAddress(address.toCLIStyleString());
} else {
throw MGMT_OP_LOGGER.noAttributeDefined(name, address.toCLIStyleString());
}
}
} else {
Expand Down

0 comments on commit fd8e69e

Please sign in to comment.