Skip to content

Commit

Permalink
#30669 update variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinogiardino committed Dec 3, 2024
1 parent d0bc568 commit e4e55ba
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,15 @@ && getWorkflowActionId(parameters).isEmpty()) {
* {@link JobValidationException} is thrown.</p>
*
* @param parameters The job parameters containing the fields to validate
* @param contentTypeFound The content type to validate the fields against
* @param contentType The content type to validate the fields against
* @throws JobValidationException if any field specified in the parameters is not found in the content type
*/
private void validateFields(final Map<String, Object> parameters, final ContentType contentTypeFound) {
var fields = contentTypeFound.fields();
for (String field : getFields(parameters)) {
if (fields.stream().noneMatch(f -> Objects.equals(f.id(), field))) {
private void validateFields(final Map<String, Object> parameters, final ContentType contentType) {
var contentTypeFields = contentType.fields();
for (String providedField : getFields(parameters)) {
if (contentTypeFields.stream().noneMatch(field -> Objects.equals(field.id(), providedField))) {
final var errorMessage = String.format(
"Field [%s] not found in Content Type [%s].", field, contentTypeFound.variable()
"Field [%s] not found in Content Type [%s].", providedField, contentType.variable()
);
Logger.error(this, errorMessage);
throw new JobValidationException(errorMessage);
Expand Down

0 comments on commit e4e55ba

Please sign in to comment.