Simplify KeyReader

This commit is contained in:
Paul Schaub 2023-05-16 16:48:21 +02:00
parent 5c11b8af08
commit 7d049d0ac4
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
1 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ class KeyReader {
throw e; throw e;
} }
if (requireContent && (keys == null || keys.size() == 0)) { if (requireContent && keys.size() == 0) {
throw new SOPGPException.BadData(new PGPException("No key data found.")); throw new SOPGPException.BadData(new PGPException("No key data found."));
} }
@ -53,7 +53,7 @@ class KeyReader {
} }
throw e; throw e;
} }
if (requireContent && (certs == null || certs.size() == 0)) { if (requireContent && certs.size() == 0) {
throw new SOPGPException.BadData(new PGPException("No cert data found.")); throw new SOPGPException.BadData(new PGPException("No cert data found."));
} }
return certs; return certs;