Skip to content

Commit

Permalink
Issue-256: Updated the checkHeader to allow header_url in both video …
Browse files Browse the repository at this point in the history
…and image a… (#257)

* updated the checkHeader to allow header_url in both video and image as it is supported

* added document format

---------

Co-authored-by: denizkilic <[email protected]>
  • Loading branch information
DckcDan and denizkilic authored May 28, 2024
1 parent 61fc3f2 commit d9af927
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,9 @@ private void checkHeaderText() throws IllegalArgumentException {
* @throws IllegalArgumentException Occurs when type is not {@code HEADER} and format is not {@code IMAGE}.
*/
private void checkHeaderUrl() throws IllegalArgumentException {
if (!(type.equals(HSMComponentType.HEADER)
&& format.equals(HSMComponentFormat.IMAGE))
) {
throw new IllegalArgumentException("\"header_url\" is available for only HEADER type and IMAGE format.");
if (!(type.equals(HSMComponentType.HEADER) &&
(format.equals(HSMComponentFormat.IMAGE) || format.equals(HSMComponentFormat.VIDEO) || format.equals(HSMComponentFormat.DOCUMENT)))) {
throw new IllegalArgumentException("\"header_url\" is available for only HEADER type and IMAGE, VIDEO and DOCUMENT format.");
}
}
}

0 comments on commit d9af927

Please sign in to comment.