1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-18 02:12:06 +01:00

Mark ArmoredInputStreamFactory methods as @Nonnull

This commit is contained in:
Paul Schaub 2023-05-16 16:44:26 +02:00
parent 772c0407b3
commit 5c11b8af08
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -9,6 +9,8 @@ import java.io.InputStream;
import org.bouncycastle.bcpg.ArmoredInputStream; import org.bouncycastle.bcpg.ArmoredInputStream;
import javax.annotation.Nonnull;
/** /**
* Factory class for instantiating preconfigured {@link ArmoredInputStream ArmoredInputStreams}. * Factory class for instantiating preconfigured {@link ArmoredInputStream ArmoredInputStreams}.
* {@link #get(InputStream)} will return an {@link ArmoredInputStream} that is set up to properly detect CRC errors. * {@link #get(InputStream)} will return an {@link ArmoredInputStream} that is set up to properly detect CRC errors.
@ -26,7 +28,8 @@ public final class ArmoredInputStreamFactory {
* @return armored input stream * @return armored input stream
* @throws IOException in case of an IO error * @throws IOException in case of an IO error
*/ */
public static ArmoredInputStream get(InputStream inputStream) throws IOException { @Nonnull
public static ArmoredInputStream get(@Nonnull InputStream inputStream) throws IOException {
if (inputStream instanceof CRCingArmoredInputStreamWrapper) { if (inputStream instanceof CRCingArmoredInputStreamWrapper) {
return (ArmoredInputStream) inputStream; return (ArmoredInputStream) inputStream;
} }