From 8565cc7f9beca3fa8d82529373dc37100ba121a2 Mon Sep 17 00:00:00 2001 From: miguelaranda0 <90468342+miguelaranda0@users.noreply.github.com> Date: Wed, 22 Jan 2025 10:59:22 +0000 Subject: [PATCH] Correct linting issues between gms and github. (#1295) * Correct linting issues between gms and github. Should hopefully make integrating somewhat easier. * Update CipherBasicsTest.java Make it pass clang --------- Co-authored-by: Pete Bentley <44170157+prbprbprb@users.noreply.github.com> --- .../main/java/org/conscrypt/metrics/NoopStatsLog.java | 3 +++ .../main/java/org/conscrypt/metrics/StatsLogImpl.java | 3 +++ .../org/conscrypt/javax/crypto/CipherBasicsTest.java | 9 +++++---- .../src/test/java/org/conscrypt/AndroidHpkeSpiTest.java | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/org/conscrypt/metrics/NoopStatsLog.java b/common/src/main/java/org/conscrypt/metrics/NoopStatsLog.java index f6befdbb8..8bd7232b5 100644 --- a/common/src/main/java/org/conscrypt/metrics/NoopStatsLog.java +++ b/common/src/main/java/org/conscrypt/metrics/NoopStatsLog.java @@ -20,6 +20,9 @@ import org.conscrypt.ct.PolicyCompliance; import org.conscrypt.ct.VerificationResult; +/** + * Noop class for stats logging + */ @Internal public class NoopStatsLog implements StatsLog { private static final StatsLog INSTANCE = new NoopStatsLog(); diff --git a/common/src/main/java/org/conscrypt/metrics/StatsLogImpl.java b/common/src/main/java/org/conscrypt/metrics/StatsLogImpl.java index 8a5421fcd..42f8b2e5f 100644 --- a/common/src/main/java/org/conscrypt/metrics/StatsLogImpl.java +++ b/common/src/main/java/org/conscrypt/metrics/StatsLogImpl.java @@ -44,6 +44,9 @@ import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; +/** + * Implements logging for Conscrypt metrics. + */ @Internal public final class StatsLogImpl implements StatsLog { private static final ExecutorService e = Executors.newSingleThreadExecutor(new ThreadFactory() { diff --git a/common/src/test/java/org/conscrypt/javax/crypto/CipherBasicsTest.java b/common/src/test/java/org/conscrypt/javax/crypto/CipherBasicsTest.java index 8fc873f93..819f3e16d 100644 --- a/common/src/test/java/org/conscrypt/javax/crypto/CipherBasicsTest.java +++ b/common/src/test/java/org/conscrypt/javax/crypto/CipherBasicsTest.java @@ -416,10 +416,11 @@ public void testAeadEncryption() throws Exception { // Some providers may not support all tag lengths or nonce lengths, // that's allowed if (e.getMessage().contains("IV must not be re-used")) { - throw new AssertionError( - "The same IV was used twice and therefore some tests did not run." + - "Provider = " + p.getName() + ", algorithm = " + transformation, - e); + throw new AssertionError("The same IV was used twice and therefore " + + "some tests did not run." + + "Provider = " + p.getName() + + ", algorithm = " + transformation, + e); } } } diff --git a/platform/src/test/java/org/conscrypt/AndroidHpkeSpiTest.java b/platform/src/test/java/org/conscrypt/AndroidHpkeSpiTest.java index 2545c2e1b..94b4f515e 100644 --- a/platform/src/test/java/org/conscrypt/AndroidHpkeSpiTest.java +++ b/platform/src/test/java/org/conscrypt/AndroidHpkeSpiTest.java @@ -54,4 +54,4 @@ public void functionalTest() throws Exception { assertNotNull(DuckTypedHpkeSpi.newInstance(spi)); } } -} \ No newline at end of file +}