From 7d049d0ac4cd9614fe757aa131ad404d05fff998 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Tue, 16 May 2023 16:48:21 +0200 Subject: [PATCH] Simplify KeyReader --- .../src/main/java/org/pgpainless/sop/KeyReader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pgpainless-sop/src/main/java/org/pgpainless/sop/KeyReader.java b/pgpainless-sop/src/main/java/org/pgpainless/sop/KeyReader.java index 786a715c..59515200 100644 --- a/pgpainless-sop/src/main/java/org/pgpainless/sop/KeyReader.java +++ b/pgpainless-sop/src/main/java/org/pgpainless/sop/KeyReader.java @@ -35,7 +35,7 @@ class KeyReader { throw e; } - if (requireContent && (keys == null || keys.size() == 0)) { + if (requireContent && keys.size() == 0) { throw new SOPGPException.BadData(new PGPException("No key data found.")); } @@ -53,7 +53,7 @@ class KeyReader { } throw e; } - if (requireContent && (certs == null || certs.size() == 0)) { + if (requireContent && certs.size() == 0) { throw new SOPGPException.BadData(new PGPException("No cert data found.")); } return certs;