Skip to content

Commit

Permalink
squash! Wrap IllegalArgumentException thrown by Base64 decoder
Browse files Browse the repository at this point in the history
Get rid of unnecessary `throws IOException` in Base64Decoder
  • Loading branch information
vladimirlagunov committed Apr 9, 2024
1 parent 5c054bc commit 6ad7e1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/schmizz/sshj/common/Base64Decoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ public class Base64Decoder {
private Base64Decoder() {
}

public static byte[] decode(byte[] source) throws IOException, Base64DecodingException {
public static byte[] decode(byte[] source) throws Base64DecodingException {
try {
return Base64.getDecoder().decode(source);
} catch (IllegalArgumentException err) {
throw new Base64DecodingException(err);
}
}

public static byte[] decode(String src) throws IOException, Base64DecodingException {
public static byte[] decode(String src) throws Base64DecodingException {
try {
return Base64.getDecoder().decode(src);
} catch (IllegalArgumentException err) {
Expand Down

0 comments on commit 6ad7e1e

Please sign in to comment.