okhttp: Comment out VisibleForTesting annotation (#9352)

Android linters can't recognize the difference when VisibleForTesting
is used because the method has different visibility, or because
the method only intended for testing.

Because of that linter complains when VisibleForTesting methods are
used in the production code.

Ideally we want to replace or remove this annotation, as its
usage for marking altered visibility for testing purposes is
discouraged since guava v30.0.
This commit is contained in:
Sergii Tkachenko 2022-07-08 18:00:48 -07:00 committed by GitHub
parent 19ad4467db
commit fe1cfc9b96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ public final class OkHttpChannelBuilder extends
PLAINTEXT
}
@VisibleForTesting
// @VisibleForTesting
static final ConnectionSpec INTERNAL_DEFAULT_CONNECTION_SPEC =
new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
.cipherSuites(

View File

@ -125,7 +125,7 @@ public final class OkHttpServerBuilder extends ForwardingServerBuilder<OkHttpSer
return serverImplBuilder;
}
@VisibleForTesting
// @VisibleForTesting
OkHttpServerBuilder setTransportTracerFactory(TransportTracer.Factory transportTracerFactory) {
this.transportTracerFactory = transportTracerFactory;
return this;