Skip to content

Commit

Permalink
fix: avoid problem with urlCheck due to wrong operator position
Browse files Browse the repository at this point in the history
When the operator `&&` in a multi-line boolean expression is not and the end
of the first line but added to the beginning of the second line, evaluation
will fail with an `unexpected token` message.

SVC-1872
  • Loading branch information
florianesser authored and annat2022 committed Aug 29, 2024
1 parent 584f01f commit 11b3f28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Snippets/end.Checks.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,10 @@ def existsCheck(String codeMissing, String sheet, String field, boolean isWarnin

def urlCheck(String codeInvalid, String codeMissing, String sheet, String field, String mustStartWith = null, boolean isWarning = false, long maxLength = _project.vars.MAX_URL_LENGTH as long) {
generalCheck(codeInvalid, codeMissing, sheet, field, 'is not a valid URL',
mustStartWith ? isValidUrlThatStartsWith(mustStartWith) : isValidUrl(),
null, isWarning)
&& generalCheck('LEN', null, sheet, field, "is too long (max. allowed length is ${maxLength})", isNotTooLong(maxLength), null, isWarning)
mustStartWith ? isValidUrlThatStartsWith(mustStartWith) : isValidUrl(),
null, isWarning) &&
generalCheck('LEN', null, sheet, field, "is too long (max. allowed length is ${maxLength})",
isNotTooLong(maxLength), null, isWarning)
}

def costCheck(String codeInvalid, String codeMissing, String sheet, String field, boolean isWarning = false) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<name>UBA HES nach END DF7_10 Railway</name>
<author>Anna Tamm (wetransform GmbH)</author>
<created>2023-11-15T16:11:09.513+01:00</created>
<modified>2024-08-16T13:33:28.985+02:00</modified>
<modified>2024-08-29T09:09:30.571+02:00</modified>
<save-config action-id="project.save" provider-id="eu.esdihumboldt.hale.io.project.hale25.xml.writer">
<setting name="charset">UTF-8</setting>
<setting name="projectFiles.separate">false</setting>
Expand Down

0 comments on commit 11b3f28

Please sign in to comment.