mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-22 19:08:00 +01:00
Move finalization of signatures into own method
This commit is contained in:
parent
bed18dc0ad
commit
31c4570d10
1 changed files with 8 additions and 6 deletions
|
@ -67,9 +67,7 @@ public abstract class SignatureInputStream extends FilterInputStream {
|
|||
final int data = super.read();
|
||||
final boolean endOfStream = data == -1;
|
||||
if (endOfStream) {
|
||||
parseAndCombineSignatures();
|
||||
verifyOnePassSignatures();
|
||||
verifyDetachedSignatures();
|
||||
finalizeSignatures();
|
||||
} else {
|
||||
byte b = (byte) data;
|
||||
updateOnePassSignatures(b);
|
||||
|
@ -84,9 +82,7 @@ public abstract class SignatureInputStream extends FilterInputStream {
|
|||
|
||||
final boolean endOfStream = read == -1;
|
||||
if (endOfStream) {
|
||||
parseAndCombineSignatures();
|
||||
verifyOnePassSignatures();
|
||||
verifyDetachedSignatures();
|
||||
finalizeSignatures();
|
||||
} else {
|
||||
updateOnePassSignatures(b, off, read);
|
||||
updateDetachedSignatures(b, off, read);
|
||||
|
@ -94,6 +90,12 @@ public abstract class SignatureInputStream extends FilterInputStream {
|
|||
return read;
|
||||
}
|
||||
|
||||
private void finalizeSignatures() {
|
||||
parseAndCombineSignatures();
|
||||
verifyOnePassSignatures();
|
||||
verifyDetachedSignatures();
|
||||
}
|
||||
|
||||
public void parseAndCombineSignatures() {
|
||||
if (objectFactory == null) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue