Skip to content

Commit

Permalink
fix: precondition check for configure
Browse files Browse the repository at this point in the history
  • Loading branch information
silenium-dev committed Aug 10, 2024
1 parent 916c1b9 commit 01c977a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ abstract class JobTransformerBase<IT, IP, OT, OP>(
protected var job: Job? = null

override fun configure(pad: UInt, metadata: IP): Result<Unit> {
if (!inputMetadata_.containsKey(pad)) return Result.failure(IllegalStateException("pad already configured"))
if (inputMetadata_.containsKey(pad)) return Result.failure(IllegalStateException("pad already configured"))
if (pads?.contains(pad) == false) return Result.failure(IllegalStateException("pad not allowed"))

inputMetadata_[pad] = metadata
Expand Down

0 comments on commit 01c977a

Please sign in to comment.