Skip to content

Commit

Permalink
fix(cloud-paper-signed-arguments): Handle case where signing is disabled
Browse files Browse the repository at this point in the history
fixes #86
  • Loading branch information
jpenilla committed Jul 26, 2024
1 parent b816d39 commit 34bef65
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,11 @@ public CompletableFuture<ArgumentParseResult<SignedString>> apply(
} catch (final Throwable thr) {
return ArgumentParseResult.successFuture(SignedString.unsigned(str));
}
if (signedArgs.isEmpty()) {
return ArgumentParseResult.successFuture(SignedString.unsigned(str));
}
if (signedArgs.size() != 1) {
throw new IllegalStateException();
throw new IllegalStateException("Found more signed arguments than expected (" + signedArgs.size() + ")");
}
return ArgumentParseResult.successFuture(
new SignedStringImpl(
Expand Down

0 comments on commit 34bef65

Please sign in to comment.