1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-10 18:59:39 +02:00

KeyRingReader: Remove unused @throws IOException

This commit is contained in:
Paul Schaub 2023-05-03 17:23:13 +02:00
parent fb581f11c7
commit 005b9d477a
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
8 changed files with 14 additions and 25 deletions

View file

@ -7,8 +7,6 @@ package org.bouncycastle;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.security.InvalidAlgorithmParameterException;
import java.security.NoSuchAlgorithmException;
import org.bouncycastle.openpgp.PGPException;
import org.bouncycastle.openpgp.PGPPrivateKey;
@ -25,8 +23,6 @@ import org.pgpainless.key.info.KeyRingInfo;
import org.pgpainless.key.protection.SecretKeyRingProtector;
import org.pgpainless.key.protection.UnlockSecretKey;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class CachingBcPublicKeyDataDecryptorFactoryTest {
private static final String KEY = "-----BEGIN PGP PRIVATE KEY BLOCK-----\n" +
@ -64,7 +60,7 @@ public class CachingBcPublicKeyDataDecryptorFactoryTest {
"-----END PGP MESSAGE-----";
@Test
public void test() throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException, IOException {
public void test() throws PGPException, IOException {
PGPSecretKeyRing secretKeys = PGPainless.readKeyRing().secretKeyRing(KEY);
SecretKeyRingProtector protector = SecretKeyRingProtector.unprotectedKeys();
KeyRingInfo info = PGPainless.inspectKeyRing(secretKeys);

View file

@ -56,7 +56,7 @@ public class PGPKeyRingCollectionTest {
}
@Test
public void testConstructorFromCollection() throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException, IOException {
public void testConstructorFromCollection() throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException {
PGPSecretKeyRing first = PGPainless.generateKeyRing().simpleEcKeyRing("alice@wonderland.lit");
PGPSecretKeyRing second = PGPainless.generateKeyRing().simpleEcKeyRing("bob@the-builder.tv");
PGPPublicKeyRing secondPub = KeyRingUtils.publicKeyRingFrom(second);