1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-05 03:55:58 +01:00

Make checkstyle happy

This commit is contained in:
Paul Schaub 2023-06-24 17:21:43 +02:00
parent 0ee3f0ed9a
commit 08d516c990
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
14 changed files with 74 additions and 4 deletions

View file

@ -12,7 +12,6 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.function.Supplier;
import org.bouncycastle.bcpg.sig.RevocationReason;
import org.bouncycastle.openpgp.PGPPublicKey;
@ -36,6 +35,7 @@ import org.pgpainless.wot.dijkstra.sq.CertificationSet;
import org.pgpainless.wot.dijkstra.sq.Network;
import org.pgpainless.wot.dijkstra.sq.Optional;
import org.pgpainless.wot.dijkstra.sq.ReferenceTime;
import org.pgpainless.wot.sugar.Supplier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pgp.certificate_store.certificate.Certificate;
@ -140,7 +140,7 @@ public class WebOfTrust implements CertificateAuthority {
return nb.buildNetwork();
}
private static class NetworkBuilder {
private static final class NetworkBuilder {
// Index structures
private final Map<OpenPgpFingerprint, KeyRingInfo> byFingerprint = new HashMap<>();

View file

@ -0,0 +1,10 @@
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
package org.pgpainless.wot.sugar;
public interface Supplier<T> {
T get();
}

View file

@ -0,0 +1,8 @@
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
/**
* Syntactic sugar, backported from Java 8.
*/
package org.pgpainless.wot.sugar;

View file

@ -19,6 +19,8 @@ public class WebOfTrustTest {
WebOfTrust wot = new WebOfTrust(store);
wot.initialize();
// CHECKSTYLE:OFF
System.out.println(wot);
// CHECKSTYLE:ON
}
}

View file

@ -0,0 +1,8 @@
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
/**
* Test fixtures for WOT.
*/
package org.pgpainless.wot.testfixtures;

View file

@ -11,6 +11,8 @@ public class AJavaClass {
* Used by {@link org.pgpainless.kotlin_experiments.java_from_kotlin.AccessJavaFromKotlin}.
*/
public void doSomething() {
// CHECKSTYLE:OFF
System.out.println("Something has been done.");
// CHECKSTYLE:ON
}
}

View file

@ -15,6 +15,8 @@ public class AccessKotlinFromJava {
public static void main(String[] args) {
// from src/kotlin/.../
AKotlinClass kotlin = new AKotlinClass();
// CHECKSTYLE:OFF
kotlin.printToStdout();
// CHECKSTYLE:ON
}
}

View file

@ -0,0 +1,9 @@
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
/**
* Demonstration package.
* TODO: Delete later.
*/
package org.pgpainless.kotlin_experiments.kotlin_from_java;

View file

@ -0,0 +1,9 @@
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
/**
* Demonstration package.
* TODO: Delete later.
*/
package org.pgpainless.kotlin_experiments;

View file

@ -121,7 +121,7 @@ public final class CertificationSet {
StringBuilder sb = new StringBuilder();
for (Map.Entry<Optional<String>, List<Certification>> entry : certifications.entrySet()) {
for (Certification certification : entry.getValue()) {
sb.append(certification).append("\n");
sb.append(certification).append('\n');
}
}
return sb.toString();

View file

@ -67,4 +67,4 @@ public class Network {
}
return sb.toString();
}
}
}

View file

@ -10,6 +10,8 @@ package org.pgpainless.kotlin_experiments
class AKotlinClass {
fun printToStdout() {
// CHECKSTYLE:OFF
println("'Hello, World' from Kotlin!")
// CHECKSTYLE:ON
}
}

View file

@ -0,0 +1,9 @@
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
/**
* Demonstration package.
* TODO: Delete later.
*/
package org.pgpainless.kotlin_experiments.java_from_kotlin;

View file

@ -0,0 +1,9 @@
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
/**
* Demonstration package.
* TODO: Delete later.
*/
package org.pgpainless.kotlin_experiments;