1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-20 03:12:05 +01:00

Fix checkstyle issues and java API compatibility

This commit is contained in:
Paul Schaub 2022-07-22 13:59:15 +02:00
parent 5a86d9db62
commit cb23cad625
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -10,14 +10,9 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.security.InvalidAlgorithmParameterException;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
@ -34,6 +29,7 @@ import org.bouncycastle.openpgp.PGPSecretKeyRing;
import org.bouncycastle.openpgp.PGPSecretKeyRingCollection;
import org.bouncycastle.openpgp.PGPSignature;
import org.bouncycastle.openpgp.PGPUtil;
import org.bouncycastle.util.io.Streams;
import org.junit.jupiter.api.Test;
import org.opentest4j.TestAbortedException;
import org.pgpainless.PGPainless;
@ -57,7 +53,7 @@ class KeyRingReaderTest {
private byte[] readFromResource(String resourceName) throws IOException {
InputStream inputStream = requireResource(resourceName);
return inputStream.readAllBytes();
return Streams.readAll(inputStream);
}
@Test