Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct mismatches between google3 and github due to linting. #1294

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions android/src/main/java/org/conscrypt/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import dalvik.system.BlockGuard;
import dalvik.system.CloseGuard;

import org.conscrypt.NativeCrypto;
import org.conscrypt.ct.CertificateTransparency;
import org.conscrypt.metrics.CertificateTransparencyVerificationReason;
import org.conscrypt.metrics.NoopStatsLog;
Expand All @@ -50,7 +49,6 @@
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.Security;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
Expand Down
3 changes: 3 additions & 0 deletions common/src/main/java/org/conscrypt/metrics/NoopStatsLog.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions common/src/main/java/org/conscrypt/metrics/StatsLogImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
import org.conscrypt.ct.VerificationResult;

import java.lang.Thread.UncaughtExceptionHandler;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions openjdk/src/main/java/org/conscrypt/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,11 @@
import static java.nio.file.attribute.PosixFilePermission.OTHERS_EXECUTE;
import static java.nio.file.attribute.PosixFilePermission.OWNER_EXECUTE;

import org.conscrypt.NativeCrypto;
import org.conscrypt.ct.CertificateTransparency;
import org.conscrypt.metrics.CertificateTransparencyVerificationReason;
import org.conscrypt.metrics.NoopStatsLog;
import org.conscrypt.metrics.Source;
import org.conscrypt.metrics.StatsLog;
import org.conscrypt.metrics.StatsLogImpl;

import java.io.File;
import java.io.FileDescriptor;
Expand Down
9 changes: 0 additions & 9 deletions platform/src/main/java/org/conscrypt/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,18 @@

import dalvik.system.BlockGuard;
import dalvik.system.CloseGuard;
import dalvik.system.VMRuntime;

import libcore.net.NetworkSecurityPolicy;

import org.conscrypt.NativeCrypto;
import org.conscrypt.ct.CertificateTransparency;
import org.conscrypt.ct.LogStore;
import org.conscrypt.ct.LogStoreImpl;
import org.conscrypt.ct.Policy;
import org.conscrypt.ct.PolicyImpl;
import org.conscrypt.flags.Flags;
import org.conscrypt.metrics.CertificateTransparencyVerificationReason;
import org.conscrypt.metrics.OptionalMethod;
import org.conscrypt.metrics.Source;
import org.conscrypt.metrics.StatsLog;
import org.conscrypt.metrics.StatsLogImpl;

import java.io.FileDescriptor;
import java.io.IOException;
import java.lang.System;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
Expand All @@ -57,7 +49,6 @@
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.security.spec.AlgorithmParameterSpec;
Expand Down
1 change: 0 additions & 1 deletion platform/src/main/java/org/conscrypt/ct/LogStoreImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.InvalidKeyException;
Expand Down
3 changes: 2 additions & 1 deletion platform/src/test/java/org/conscrypt/AndroidHpkeSpiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@ public void functionalTest() throws Exception {
assertNotNull(DuckTypedHpkeSpi.newInstance(spi));
}
}
}
}

6 changes: 0 additions & 6 deletions platform/src/test/java/org/conscrypt/ct/LogStoreImplTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import static org.junit.Assert.assertNull;

import static java.nio.charset.StandardCharsets.US_ASCII;
import static java.nio.charset.StandardCharsets.UTF_8;

import org.conscrypt.OpenSSLKey;
import org.conscrypt.metrics.NoopStatsLog;
Expand All @@ -30,13 +29,8 @@

import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.security.PublicKey;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Base64;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import static org.junit.Assert.assertTrue;

import org.conscrypt.java.security.cert.FakeX509Certificate;
import org.junit.Assume;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
import static org.junit.Assert.assertEquals;

import android.util.StatsEvent;

import org.conscrypt.TestUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.conscrypt.metrics.OptionalMethod;

@RunWith(JUnit4.class)
public class MetricsTest {
Expand Down
Loading