From 8b5ffedd29b241d1453520597aa021ab987a036d Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Wed, 20 Oct 2021 21:40:44 +0200 Subject: [PATCH] More checkstyle issues --- .../signature/builder/CertificationSignatureBuilder.java | 4 ++++ .../signature/builder/RevocationSignatureBuilder.java | 4 +++- .../org/pgpainless/signature/builder/package-info.java | 8 ++++++++ .../subpackets/SignatureSubpacketGeneratorWrapper.java | 6 ++---- 4 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 pgpainless-core/src/main/java/org/pgpainless/signature/builder/package-info.java diff --git a/pgpainless-core/src/main/java/org/pgpainless/signature/builder/CertificationSignatureBuilder.java b/pgpainless-core/src/main/java/org/pgpainless/signature/builder/CertificationSignatureBuilder.java index 03801204..792658ee 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/signature/builder/CertificationSignatureBuilder.java +++ b/pgpainless-core/src/main/java/org/pgpainless/signature/builder/CertificationSignatureBuilder.java @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2021 Paul Schaub +// +// SPDX-License-Identifier: Apache-2.0 + package org.pgpainless.signature.builder; import org.bouncycastle.openpgp.PGPException; diff --git a/pgpainless-core/src/main/java/org/pgpainless/signature/builder/RevocationSignatureBuilder.java b/pgpainless-core/src/main/java/org/pgpainless/signature/builder/RevocationSignatureBuilder.java index bd7bef31..db263f07 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/signature/builder/RevocationSignatureBuilder.java +++ b/pgpainless-core/src/main/java/org/pgpainless/signature/builder/RevocationSignatureBuilder.java @@ -37,5 +37,7 @@ public class RevocationSignatureBuilder extends AbstractSignatureBuilder +// +// SPDX-License-Identifier: Apache-2.0 + +/** + * Classes related to OpenPGP signatures. + */ +package org.pgpainless.signature.builder; diff --git a/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpacketGeneratorWrapper.java b/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpacketGeneratorWrapper.java index 59ce6a47..5a4e72d3 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpacketGeneratorWrapper.java +++ b/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpacketGeneratorWrapper.java @@ -549,12 +549,10 @@ public class SignatureSubpacketGeneratorWrapper byte[] sig = signature.getEncoded(); byte[] data; - if (sig.length - 1 > 256) - { + if (sig.length - 1 > 256) { data = new byte[sig.length - 3]; } - else - { + else { data = new byte[sig.length - 2]; }