diff --git a/SECURITY.md b/SECURITY.md index bf2206a7d1..774579bf68 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -84,7 +84,7 @@ with OpenSSL](#tls-with-netty-tcnative-on-openssl) are other valid options. [Apache Tomcat's tcnative](https://tomcat.apache.org/native-doc/) and is a JNI wrapper around OpenSSL/BoringSSL/LibreSSL. -We recommend BoringSSL for its simplicitly and low occurrence of security +We recommend BoringSSL for its simplicity and low occurrence of security vulnerabilities relative to OpenSSL. BoringSSL is used by Conscrypt as well. ### TLS with netty-tcnative on BoringSSL diff --git a/alts/src/main/java/io/grpc/alts/AltsChannelBuilder.java b/alts/src/main/java/io/grpc/alts/AltsChannelBuilder.java index af80a3c5dd..ca33f8b00b 100644 --- a/alts/src/main/java/io/grpc/alts/AltsChannelBuilder.java +++ b/alts/src/main/java/io/grpc/alts/AltsChannelBuilder.java @@ -29,7 +29,7 @@ import javax.annotation.Nullable; /** * ALTS version of {@code ManagedChannelBuilder}. This class sets up a secure and authenticated - * commmunication between two cloud VMs using ALTS. + * communication between two cloud VMs using ALTS. */ @ExperimentalApi("https://github.com/grpc/grpc-java/issues/4151") public final class AltsChannelBuilder extends ForwardingChannelBuilder2 { diff --git a/alts/src/main/java/io/grpc/alts/AltsChannelCredentials.java b/alts/src/main/java/io/grpc/alts/AltsChannelCredentials.java index 7c603d31fc..e12344f73d 100644 --- a/alts/src/main/java/io/grpc/alts/AltsChannelCredentials.java +++ b/alts/src/main/java/io/grpc/alts/AltsChannelCredentials.java @@ -36,7 +36,7 @@ import java.util.logging.Level; import java.util.logging.Logger; /** - * Provides secure and authenticated commmunication between two cloud VMs using ALTS. + * Provides secure and authenticated communication between two cloud VMs using ALTS. */ @ExperimentalApi("https://github.com/grpc/grpc-java/issues/4151") public final class AltsChannelCredentials { diff --git a/alts/src/test/java/io/grpc/alts/internal/FakeTsiHandshaker.java b/alts/src/test/java/io/grpc/alts/internal/FakeTsiHandshaker.java index a68f842a98..a962fc0023 100644 --- a/alts/src/test/java/io/grpc/alts/internal/FakeTsiHandshaker.java +++ b/alts/src/test/java/io/grpc/alts/internal/FakeTsiHandshaker.java @@ -147,7 +147,7 @@ public class FakeTsiHandshaker implements TsiHandshaker { return; } - // Prepare the next message, if neeeded. + // Prepare the next message, if needed. if (sendBuffer == null) { if (sendState.next() != receiveState) { // We're still waiting for bytes from the peer, so bail. diff --git a/api/src/main/java/io/grpc/ServerInterceptors.java b/api/src/main/java/io/grpc/ServerInterceptors.java index 0bc6d07c83..6626c8e581 100644 --- a/api/src/main/java/io/grpc/ServerInterceptors.java +++ b/api/src/main/java/io/grpc/ServerInterceptors.java @@ -197,7 +197,7 @@ public final class ServerInterceptors { * to allow for interceptors to handle messages as multiple different ReqT/RespT types within * the chain if the added cost of serialization is not a concern. * - * @param serviceDef the sevice definition to add request and response marshallers to. + * @param serviceDef the service definition to add request and response marshallers to. * @param requestMarshaller request marshaller * @param responseMarshaller response marshaller * @param the request payload type diff --git a/api/src/main/java/io/grpc/SynchronizationContext.java b/api/src/main/java/io/grpc/SynchronizationContext.java index 910219b452..5a7677ac15 100644 --- a/api/src/main/java/io/grpc/SynchronizationContext.java +++ b/api/src/main/java/io/grpc/SynchronizationContext.java @@ -163,7 +163,7 @@ public final class SynchronizationContext implements Executor { } /** - * Schedules a task to be added and run via {@link #execute} after an inital delay and then + * Schedules a task to be added and run via {@link #execute} after an initial delay and then * repeated after the delay until cancelled. * * @param task the task being scheduled diff --git a/api/src/test/java/io/grpc/MethodDescriptorTest.java b/api/src/test/java/io/grpc/MethodDescriptorTest.java index 5e742fb47e..9431190984 100644 --- a/api/src/test/java/io/grpc/MethodDescriptorTest.java +++ b/api/src/test/java/io/grpc/MethodDescriptorTest.java @@ -67,7 +67,7 @@ public class MethodDescriptorTest { assertFalse(descriptor.isIdempotent()); - // Create a new desriptor by setting idempotent to true + // Create a new descriptor by setting idempotent to true MethodDescriptor newDescriptor = descriptor.toBuilder().setIdempotent(true).build(); assertTrue(newDescriptor.isIdempotent()); @@ -86,7 +86,7 @@ public class MethodDescriptorTest { .build(); assertFalse(descriptor.isSafe()); - // Create a new desriptor by setting safe to true + // Create a new descriptor by setting safe to true MethodDescriptor newDescriptor = descriptor.toBuilder().setSafe(true).build(); assertTrue(newDescriptor.isSafe()); // All other fields should staty the same diff --git a/binder/src/androidTest/java/io/grpc/binder/internal/BinderTransportTest.java b/binder/src/androidTest/java/io/grpc/binder/internal/BinderTransportTest.java index 6507b940b0..a7f91fae01 100644 --- a/binder/src/androidTest/java/io/grpc/binder/internal/BinderTransportTest.java +++ b/binder/src/androidTest/java/io/grpc/binder/internal/BinderTransportTest.java @@ -136,7 +136,7 @@ public final class BinderTransportTest extends AbstractTransportTest { // refers to an Android Service class declared in an applications manifest. // // However, unlike a regular network server, which is responsible for listening on its port, a - // BinderServier is not responsible for the creation of its host Service. The opposite is + // BinderServer is not responsible for the creation of its host Service. The opposite is // the case, with the host Android Service (itself created by the Android platform in // response to a connection) building the gRPC server. // diff --git a/binder/src/main/java/io/grpc/binder/SecurityPolicies.java b/binder/src/main/java/io/grpc/binder/SecurityPolicies.java index a45d98de9c..fc65fb1142 100644 --- a/binder/src/main/java/io/grpc/binder/SecurityPolicies.java +++ b/binder/src/main/java/io/grpc/binder/SecurityPolicies.java @@ -321,7 +321,7 @@ public final class SecurityPolicies { packageInfo = packageManager.getPackageInfo(packageName, PackageManager.GET_SIGNATURES); if (packageInfo.signatures == null || packageInfo.signatures.length != 1) { // Reject multiply-signed apks because of b/13678484 - // (See PackageManagerGetSignatures supression above). + // (See PackageManagerGetSignatures suppression above). return false; } diff --git a/buildscripts/checkstyle.xml b/buildscripts/checkstyle.xml index 960fa162ed..035b1dfc90 100644 --- a/buildscripts/checkstyle.xml +++ b/buildscripts/checkstyle.xml @@ -202,7 +202,7 @@ - diff --git a/core/src/main/java/io/grpc/internal/ClientTransport.java b/core/src/main/java/io/grpc/internal/ClientTransport.java index a569a7922d..98041cc6e7 100644 --- a/core/src/main/java/io/grpc/internal/ClientTransport.java +++ b/core/src/main/java/io/grpc/internal/ClientTransport.java @@ -61,7 +61,7 @@ public interface ClientTransport extends InternalInstrumented { * Pings a remote endpoint. When an acknowledgement is received, the given callback will be * invoked using the given executor. * - *

Pings are not necessarily sent to the same endpont, thus a successful ping only means at + *

Pings are not necessarily sent to the same endpoint, thus a successful ping only means at * least one endpoint responded, but doesn't imply the availability of other endpoints (if there * is any). * diff --git a/core/src/main/java/io/grpc/internal/DelayedClientTransport.java b/core/src/main/java/io/grpc/internal/DelayedClientTransport.java index 0be8eec309..11171e94c5 100644 --- a/core/src/main/java/io/grpc/internal/DelayedClientTransport.java +++ b/core/src/main/java/io/grpc/internal/DelayedClientTransport.java @@ -90,7 +90,7 @@ final class DelayedClientTransport implements ManagedClientTransport { /** * Creates a new delayed transport. * - * @param defaultAppExecutor pending streams will create real streams and run bufferred operations + * @param defaultAppExecutor pending streams will create real streams and run buffered operations * in an application executor, which will be this executor, unless there is on provided in * {@link CallOptions}. * @param syncContext all listener callbacks of the delayed transport will be run from this diff --git a/core/src/main/java/io/grpc/internal/DelayedStream.java b/core/src/main/java/io/grpc/internal/DelayedStream.java index 28ce2764c7..cc9dd0effc 100644 --- a/core/src/main/java/io/grpc/internal/DelayedStream.java +++ b/core/src/main/java/io/grpc/internal/DelayedStream.java @@ -46,7 +46,7 @@ class DelayedStream implements ClientStream { private volatile boolean passThrough; /** * Non-{@code null} iff start has been called. Used to assert methods are called in appropriate - * order, but also used if an error occurrs before {@code realStream} is set. + * order, but also used if an error occurs before {@code realStream} is set. */ private ClientStreamListener listener; /** Must hold {@code this} lock when setting. */ diff --git a/core/src/main/java/io/grpc/internal/ManagedChannelImpl.java b/core/src/main/java/io/grpc/internal/ManagedChannelImpl.java index d908e6bd80..177124cb85 100644 --- a/core/src/main/java/io/grpc/internal/ManagedChannelImpl.java +++ b/core/src/main/java/io/grpc/internal/ManagedChannelImpl.java @@ -196,7 +196,7 @@ final class ManagedChannelImpl extends ManagedChannel implements private final CompressorRegistry compressorRegistry; private final Supplier stopwatchSupplier; - /** The timout before entering idle mode. */ + /** The timeout before entering idle mode. */ private final long idleTimeoutMillis; private final ConnectivityStateManager channelStateManager = new ConnectivityStateManager(); diff --git a/core/src/main/java/io/grpc/internal/SerializingExecutor.java b/core/src/main/java/io/grpc/internal/SerializingExecutor.java index 73133a339e..7044b4e17f 100644 --- a/core/src/main/java/io/grpc/internal/SerializingExecutor.java +++ b/core/src/main/java/io/grpc/internal/SerializingExecutor.java @@ -113,7 +113,7 @@ public final class SerializingExecutor implements Executor, Runnable { // ConcurrentLinkedQueue claims that null elements are not allowed, but seems to not // throw if the item to remove is null. If removable is present in the queue twice, // the wrong one may be removed. It doesn't seem possible for this case to exist today. - // This is important to run in case of RejectedExectuionException, so that future calls + // This is important to run in case of RejectedExecutionException, so that future calls // to execute don't succeed and accidentally run a previous runnable. runQueue.remove(removable); } diff --git a/core/src/test/java/io/grpc/internal/DnsNameResolverTest.java b/core/src/test/java/io/grpc/internal/DnsNameResolverTest.java index 9c245f615d..14d3fddd29 100644 --- a/core/src/test/java/io/grpc/internal/DnsNameResolverTest.java +++ b/core/src/test/java/io/grpc/internal/DnsNameResolverTest.java @@ -930,7 +930,7 @@ public class DnsNameResolverTest { } @Test - public void maybeChooseServiceConfig_clientLanguageMatchesEmtpy() { + public void maybeChooseServiceConfig_clientLanguageMatchesEmpty() { Map choice = new LinkedHashMap<>(); List langs = new ArrayList<>(); choice.put("clientLanguage", langs); @@ -1099,7 +1099,7 @@ public class DnsNameResolverTest { } @Test - public void maybeChooseServiceConfig_hostnameMatchesEmtpy() { + public void maybeChooseServiceConfig_hostnameMatchesEmpty() { Map choice = new LinkedHashMap<>(); List hosts = new ArrayList<>(); choice.put("clientHostname", hosts); @@ -1191,7 +1191,7 @@ public class DnsNameResolverTest { } @Test - public void shouldUseJndi_trueIfLocalhostOverriden() { + public void shouldUseJndi_trueIfLocalhostOverridden() { boolean enableJndi = true; boolean enableJndiLocalhost = true; String host = "localhost"; diff --git a/core/src/test/java/io/grpc/internal/InternalSubchannelTest.java b/core/src/test/java/io/grpc/internal/InternalSubchannelTest.java index 05dc4549a0..f7631c34c0 100644 --- a/core/src/test/java/io/grpc/internal/InternalSubchannelTest.java +++ b/core/src/test/java/io/grpc/internal/InternalSubchannelTest.java @@ -964,7 +964,7 @@ public class InternalSubchannelTest { // This should not lead to the creation of a new transport. reconnectTask.command.run(); - // Futher call to obtainActiveTransport() is no-op. + // Further call to obtainActiveTransport() is no-op. assertNull(internalSubchannel.obtainActiveTransport()); assertEquals(SHUTDOWN, internalSubchannel.getState()); assertNoCallbackInvoke(); diff --git a/core/src/test/java/io/grpc/internal/ServerImplTest.java b/core/src/test/java/io/grpc/internal/ServerImplTest.java index dd93e29620..3125edca1e 100644 --- a/core/src/test/java/io/grpc/internal/ServerImplTest.java +++ b/core/src/test/java/io/grpc/internal/ServerImplTest.java @@ -932,7 +932,7 @@ public class ServerImplTest { } catch (Exception ex) { throw new AssertionError(ex); } - // If deadlock is possible with this setup, this sychronization completes the loop because + // If deadlock is possible with this setup, this synchronization completes the loop because // the serverShutdown needs a lock that Server is holding while calling this method. synchronized (lock) { } @@ -972,7 +972,7 @@ public class ServerImplTest { } catch (Exception ex) { throw new AssertionError(ex); } - // If deadlock is possible with this setup, this sychronization completes the loop + // If deadlock is possible with this setup, this synchronization completes the loop // because the transportTerminated needs a lock that Server is holding while calling this // method. synchronized (lock) { @@ -1298,7 +1298,7 @@ public class ServerImplTest { assertEquals(1, executor.runDueTasks()); verify(callHandler).startCall(ArgumentMatchers.>any(), ArgumentMatchers.any()); - // This call will be handled by the fallbackRegistry because it's not registred in the internal + // This call will be handled by the fallbackRegistry because it's not registered in the internal // registry. transportListener.streamCreated(stream, "Service1/Method2", requestHeaders); assertEquals(1, executor.runDueTasks()); diff --git a/core/src/test/java/io/grpc/internal/SharedResourceHolderTest.java b/core/src/test/java/io/grpc/internal/SharedResourceHolderTest.java index 531632ca79..d27195e249 100644 --- a/core/src/test/java/io/grpc/internal/SharedResourceHolderTest.java +++ b/core/src/test/java/io/grpc/internal/SharedResourceHolderTest.java @@ -98,7 +98,7 @@ public class SharedResourceHolderTest { assertEquals(SharedResourceHolder.DESTROY_DELAY_SECONDS, scheduledDestroyTask.getDelay(TimeUnit.SECONDS)); - // Simluate that the destroyer executes the foo destroying task + // Simulate that the destroyer executes the foo destroying task scheduledDestroyTask.runTask(); assertTrue(sharedFoo.closed); diff --git a/examples/example-hostname/src/test/java/io/grpc/examples/hostname/HostnameGreeterTest.java b/examples/example-hostname/src/test/java/io/grpc/examples/hostname/HostnameGreeterTest.java index 5420678d03..4165064b4b 100644 --- a/examples/example-hostname/src/test/java/io/grpc/examples/hostname/HostnameGreeterTest.java +++ b/examples/example-hostname/src/test/java/io/grpc/examples/hostname/HostnameGreeterTest.java @@ -62,7 +62,7 @@ public class HostnameGreeterTest { InProcessServerBuilder.forName("hostname") .directExecutor().addService(new HostnameGreeter(null)).build().start()); - // Just verifing the service doesn't crash + // Just verifying the service doesn't crash HelloReply reply = blockingStub.sayHello(HelloRequest.newBuilder().setName("anonymous").build()); assertTrue(reply.getMessage(), reply.getMessage().startsWith("Hello anonymous, from ")); diff --git a/grpclb/src/main/java/io/grpc/grpclb/GrpclbConfig.java b/grpclb/src/main/java/io/grpc/grpclb/GrpclbConfig.java index 4395c8415d..1476e3e2f8 100644 --- a/grpclb/src/main/java/io/grpc/grpclb/GrpclbConfig.java +++ b/grpclb/src/main/java/io/grpc/grpclb/GrpclbConfig.java @@ -55,7 +55,7 @@ final class GrpclbConfig { } /** - * If specified, it overrides the name of the sevice name to be sent to the balancer. if not, the + * If specified, it overrides the name of the service name to be sent to the balancer. if not, the * target to be sent to the balancer will continue to be obtained from the target URI passed * to the gRPC client channel. */ diff --git a/interop-testing/src/main/java/io/grpc/testing/integration/TestServiceClient.java b/interop-testing/src/main/java/io/grpc/testing/integration/TestServiceClient.java index 926016adaa..0c8f697ada 100644 --- a/interop-testing/src/main/java/io/grpc/testing/integration/TestServiceClient.java +++ b/interop-testing/src/main/java/io/grpc/testing/integration/TestServiceClient.java @@ -526,7 +526,7 @@ public class TestServiceClient { /* Parses input string as a semi-colon-separated list of colon-separated key/value pairs. * Allow any character but semicolons in values. - * If the string is emtpy, return null. + * If the string is empty, return null. * Otherwise, return a client interceptor which inserts the provided metadata. */ @Nullable diff --git a/netty/build.gradle b/netty/build.gradle index 7bff4bfd37..5533038c85 100644 --- a/netty/build.gradle +++ b/netty/build.gradle @@ -72,7 +72,7 @@ dependencies { import net.ltgt.gradle.errorprone.CheckSeverity [tasks.named("compileJava"), tasks.named("compileTestJava")]*.configure { - // Netty retuns a lot of futures that we mostly don't care about. + // Netty returns a lot of futures that we mostly don't care about. options.errorprone.check("FutureReturnValueIgnored", CheckSeverity.OFF) } diff --git a/rls/src/main/java/io/grpc/rls/CachingRlsLbClient.java b/rls/src/main/java/io/grpc/rls/CachingRlsLbClient.java index 5263975b49..f01ed6b2b3 100644 --- a/rls/src/main/java/io/grpc/rls/CachingRlsLbClient.java +++ b/rls/src/main/java/io/grpc/rls/CachingRlsLbClient.java @@ -206,7 +206,7 @@ final class CachingRlsLbClient { } /** - * Convert the status to UNAVAILBLE and enhance the error message. + * Convert the status to UNAVAILABLE and enhance the error message. * @param status status as provided by server * @param serverName Used for error description * @return Transformed status diff --git a/services/src/test/java/io/grpc/protobuf/services/BinlogHelperTest.java b/services/src/test/java/io/grpc/protobuf/services/BinlogHelperTest.java index 856029bc75..ca42c1691b 100644 --- a/services/src/test/java/io/grpc/protobuf/services/BinlogHelperTest.java +++ b/services/src/test/java/io/grpc/protobuf/services/BinlogHelperTest.java @@ -888,7 +888,7 @@ public final class BinlogHelperTest { verify(sink).write(base); } - // server messsage + // server message { sinkWriterImpl.logRpcMessage( seq, @@ -1433,16 +1433,16 @@ public final class BinlogHelperTest { // send server header { - Metadata serverInital = new Metadata(); - interceptedCall.get().sendHeaders(serverInital); + Metadata serverInitial = new Metadata(); + interceptedCall.get().sendHeaders(serverInitial); verify(mockSinkWriter).logServerHeader( /*seq=*/ eq(2L), - same(serverInital), + same(serverInitial), eq(Logger.LOGGER_SERVER), eq(CALL_ID), ArgumentMatchers.isNull()); verifyNoMoreInteractions(mockSinkWriter); - assertSame(serverInital, actualServerInitial.get()); + assertSame(serverInitial, actualServerInitial.get()); } // receive client msg diff --git a/services/src/test/java/io/grpc/protobuf/services/HealthCheckingLoadBalancerFactoryTest.java b/services/src/test/java/io/grpc/protobuf/services/HealthCheckingLoadBalancerFactoryTest.java index 4787010ebe..08a33106fb 100644 --- a/services/src/test/java/io/grpc/protobuf/services/HealthCheckingLoadBalancerFactoryTest.java +++ b/services/src/test/java/io/grpc/protobuf/services/HealthCheckingLoadBalancerFactoryTest.java @@ -273,7 +273,7 @@ public class HealthCheckingLoadBalancerFactoryTest { verifyNoMoreInteractions(origLb); Subchannel[] wrappedSubchannels = new Subchannel[NUM_SUBCHANNELS]; - // Simulate that the orignal LB creates Subchannels + // Simulate that the original LB creates Subchannels for (int i = 0; i < NUM_SUBCHANNELS; i++) { // Subchannel attributes set by origLb are correctly plumbed in String subchannelAttrValue = "eag attr " + i; diff --git a/stub/src/test/java/io/grpc/stub/ClientCallsTest.java b/stub/src/test/java/io/grpc/stub/ClientCallsTest.java index 28801874ea..f3d101b862 100644 --- a/stub/src/test/java/io/grpc/stub/ClientCallsTest.java +++ b/stub/src/test/java/io/grpc/stub/ClientCallsTest.java @@ -399,7 +399,7 @@ public class ClientCallsTest { future.get(); fail("Should fail"); } catch (CancellationException e) { - // Exepcted + // Expected } } diff --git a/xds/src/main/java/io/grpc/xds/FilterChainMatchingProtocolNegotiators.java b/xds/src/main/java/io/grpc/xds/FilterChainMatchingProtocolNegotiators.java index fa03b2add4..37a0e6a8ae 100644 --- a/xds/src/main/java/io/grpc/xds/FilterChainMatchingProtocolNegotiators.java +++ b/xds/src/main/java/io/grpc/xds/FilterChainMatchingProtocolNegotiators.java @@ -329,7 +329,7 @@ final class FilterChainMatchingProtocolNegotiators { // use prefix_ranges (CIDR) and get the most specific matches private static Collection filterOnIpAddress( Collection filterChains, InetAddress address, boolean forDestination) { - // curent list of top ones + // current list of top ones ArrayList topOnes = new ArrayList<>(filterChains.size()); int topMatchingPrefixLen = -1; for (FilterChain filterChain : filterChains) {