1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-10 14:35:59 +01:00

TeeBCPGInputStream: Annotate byte[] arg as @Nonnull

This commit is contained in:
Paul Schaub 2023-05-03 17:19:18 +02:00
parent 78cb2ec3d0
commit 3cea985365
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -19,6 +19,8 @@ import org.bouncycastle.openpgp.PGPOnePassSignature;
import org.bouncycastle.openpgp.PGPSignature;
import org.pgpainless.algorithm.OpenPgpPacket;
import javax.annotation.Nonnull;
/**
* Since we need to update signatures with data from the underlying stream, this class is used to tee out the data.
* Unfortunately we cannot simply override {@link BCPGInputStream#read()} to tee the data out though, since
@ -121,7 +123,7 @@ public class TeeBCPGInputStream {
}
@Override
public int read(byte[] b, int off, int len) throws IOException {
public int read(@Nonnull byte[] b, int off, int len) throws IOException {
if (last != -1) {
outputStream.write(last);
}