From 311fb3f67e875e310aaa5f1c9640fcd18406305d Mon Sep 17 00:00:00 2001 From: yinpeng Date: Thu, 2 May 2024 20:38:46 +0800 Subject: [PATCH 1/4] fix typo --- SECURITY.md | 2 +- api/src/main/java/io/grpc/ServerInterceptors.java | 2 +- api/src/main/java/io/grpc/SynchronizationContext.java | 2 +- api/src/test/java/io/grpc/MethodDescriptorTest.java | 4 ++-- .../main/java/io/grpc/internal/ClientTransport.java | 2 +- .../src/test/java/io/grpc/internal/ServerImplTest.java | 2 +- grpclb/src/main/java/io/grpc/grpclb/GrpclbConfig.java | 2 +- .../io/grpc/testing/integration/TestServiceClient.java | 2 +- netty/build.gradle | 2 +- services/src/main/proto/grpc/binlog/v1/binarylog.proto | 2 +- .../proto/grpc/reflection/v1alpha/reflection.proto | 4 ++-- .../io/grpc/protobuf/services/BinlogHelperTest.java | 10 +++++----- .../HealthCheckingLoadBalancerFactoryTest.java | 2 +- .../xds/FilterChainMatchingProtocolNegotiators.java | 2 +- 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index bf2206a7d1a..774579bf68b 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/api/src/main/java/io/grpc/ServerInterceptors.java b/api/src/main/java/io/grpc/ServerInterceptors.java index 0bc6d07c83c..6626c8e5810 100644 --- a/api/src/main/java/io/grpc/ServerInterceptors.java +++ b/api/src/main/java/io/grpc/ServerInterceptors.java @@ -197,7 +197,7 @@ public static ServerServiceDefinition useMarshalledMessages( * 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 910219b4523..5a7677ac15f 100644 --- a/api/src/main/java/io/grpc/SynchronizationContext.java +++ b/api/src/main/java/io/grpc/SynchronizationContext.java @@ -163,7 +163,7 @@ public String toString() { } /** - * 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 5e742fb47ed..9431190984b 100644 --- a/api/src/test/java/io/grpc/MethodDescriptorTest.java +++ b/api/src/test/java/io/grpc/MethodDescriptorTest.java @@ -67,7 +67,7 @@ public void idempotent() { 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 void safe() { .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/core/src/main/java/io/grpc/internal/ClientTransport.java b/core/src/main/java/io/grpc/internal/ClientTransport.java index a569a7922df..98041cc6e79 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 @@ ClientStream newStream( * 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/test/java/io/grpc/internal/ServerImplTest.java b/core/src/test/java/io/grpc/internal/ServerImplTest.java index dd93e296208..6c1156f33eb 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 void shutdown() { } 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) { } diff --git a/grpclb/src/main/java/io/grpc/grpclb/GrpclbConfig.java b/grpclb/src/main/java/io/grpc/grpclb/GrpclbConfig.java index 4395c8415dc..1476e3e2f83 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 @@ long getFallbackTimeoutMs() { } /** - * 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 926016adaa3..0c8f697ada5 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 @@ private void runTest(TestCases testCase) throws Exception { /* 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 7bff4bfd377..5533038c85b 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/services/src/main/proto/grpc/binlog/v1/binarylog.proto b/services/src/main/proto/grpc/binlog/v1/binarylog.proto index 9ed1733e2d8..b18bd88ddc9 100644 --- a/services/src/main/proto/grpc/binlog/v1/binarylog.proto +++ b/services/src/main/proto/grpc/binlog/v1/binarylog.proto @@ -120,7 +120,7 @@ message ClientHeader { // A single process may be used to run multiple virtual // servers with different identities. - // The authority is the name of such a server identitiy. + // The authority is the name of such a server identity. // It is typically a portion of the URI in the form of // or : . string authority = 3; diff --git a/services/src/main/proto/grpc/reflection/v1alpha/reflection.proto b/services/src/main/proto/grpc/reflection/v1alpha/reflection.proto index 8c5e06fe148..a3984b55c2d 100644 --- a/services/src/main/proto/grpc/reflection/v1alpha/reflection.proto +++ b/services/src/main/proto/grpc/reflection/v1alpha/reflection.proto @@ -80,7 +80,7 @@ message ExtensionRequest { message ServerReflectionResponse { string valid_host = 1; ServerReflectionRequest original_request = 2; - // The server set one of the following fields accroding to the message_request + // The server set one of the following fields according to the message_request // in the request. oneof message_response { // This message is used to answer file_by_filename, file_containing_symbol, @@ -91,7 +91,7 @@ message ServerReflectionResponse { // that were previously sent in response to earlier requests in the stream. FileDescriptorResponse file_descriptor_response = 4; - // This message is used to answer all_extension_numbers_of_type requst. + // This message is used to answer all_extension_numbers_of_type request. ExtensionNumberResponse all_extension_numbers_response = 5; // This message is used to answer list_services request. 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 856029bc750..ca42c1691b1 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 void logRpcMessage() throws Exception { verify(sink).write(base); } - // server messsage + // server message { sinkWriterImpl.logRpcMessage( seq, @@ -1433,16 +1433,16 @@ public ServerCall.Listener startCall( // 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 4787010ebe1..08a33106fb9 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 void typicalWorkflow() { 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/xds/src/main/java/io/grpc/xds/FilterChainMatchingProtocolNegotiators.java b/xds/src/main/java/io/grpc/xds/FilterChainMatchingProtocolNegotiators.java index fa03b2add4d..37a0e6a8ae0 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 @@ private static int getMatchingPrefixLength( // 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) { From 3de0d2c256a8c0b848cddc4d4393ede198986155 Mon Sep 17 00:00:00 2001 From: yinpeng Date: Thu, 2 May 2024 23:33:39 +0800 Subject: [PATCH 2/4] revert code --- services/src/main/proto/grpc/binlog/v1/binarylog.proto | 2 +- .../src/main/proto/grpc/reflection/v1alpha/reflection.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/src/main/proto/grpc/binlog/v1/binarylog.proto b/services/src/main/proto/grpc/binlog/v1/binarylog.proto index b18bd88ddc9..9ed1733e2d8 100644 --- a/services/src/main/proto/grpc/binlog/v1/binarylog.proto +++ b/services/src/main/proto/grpc/binlog/v1/binarylog.proto @@ -120,7 +120,7 @@ message ClientHeader { // A single process may be used to run multiple virtual // servers with different identities. - // The authority is the name of such a server identity. + // The authority is the name of such a server identitiy. // It is typically a portion of the URI in the form of // or : . string authority = 3; diff --git a/services/src/main/proto/grpc/reflection/v1alpha/reflection.proto b/services/src/main/proto/grpc/reflection/v1alpha/reflection.proto index a3984b55c2d..b417bd111ab 100644 --- a/services/src/main/proto/grpc/reflection/v1alpha/reflection.proto +++ b/services/src/main/proto/grpc/reflection/v1alpha/reflection.proto @@ -91,7 +91,7 @@ message ServerReflectionResponse { // that were previously sent in response to earlier requests in the stream. FileDescriptorResponse file_descriptor_response = 4; - // This message is used to answer all_extension_numbers_of_type request. + // This message is used to answer all_extension_numbers_of_type requst. ExtensionNumberResponse all_extension_numbers_response = 5; // This message is used to answer list_services request. From 01ae64ba2736906ba4551397876fa8b5d48896c9 Mon Sep 17 00:00:00 2001 From: yinpeng Date: Fri, 3 May 2024 00:13:12 +0800 Subject: [PATCH 3/4] fix typo --- alts/src/main/java/io/grpc/alts/AltsChannelBuilder.java | 2 +- alts/src/main/java/io/grpc/alts/AltsChannelCredentials.java | 2 +- .../test/java/io/grpc/alts/internal/FakeTsiHandshaker.java | 2 +- .../java/io/grpc/binder/internal/BinderTransportTest.java | 2 +- binder/src/main/java/io/grpc/binder/SecurityPolicies.java | 2 +- buildscripts/checkstyle.xml | 2 +- .../main/java/io/grpc/internal/DelayedClientTransport.java | 2 +- core/src/main/java/io/grpc/internal/DelayedStream.java | 2 +- core/src/main/java/io/grpc/internal/ManagedChannelImpl.java | 2 +- .../src/main/java/io/grpc/internal/SerializingExecutor.java | 2 +- .../src/test/java/io/grpc/internal/DnsNameResolverTest.java | 6 +++--- .../test/java/io/grpc/internal/InternalSubchannelTest.java | 2 +- core/src/test/java/io/grpc/internal/ServerImplTest.java | 4 ++-- .../java/io/grpc/internal/SharedResourceHolderTest.java | 2 +- .../java/io/grpc/examples/hostname/HostnameGreeterTest.java | 2 +- rls/src/main/java/io/grpc/rls/CachingRlsLbClient.java | 2 +- stub/src/test/java/io/grpc/stub/ClientCallsTest.java | 2 +- 17 files changed, 20 insertions(+), 20 deletions(-) diff --git a/alts/src/main/java/io/grpc/alts/AltsChannelBuilder.java b/alts/src/main/java/io/grpc/alts/AltsChannelBuilder.java index af80a3c5dda..ca33f8b00b9 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 @@ /** * 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 7c603d31fcd..e12344f73d7 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.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 a68f842a98e..a962fc00232 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 void getBytesToSendToPeer(ByteBuffer bytes) throws GeneralSecurityExcepti 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/binder/src/androidTest/java/io/grpc/binder/internal/BinderTransportTest.java b/binder/src/androidTest/java/io/grpc/binder/internal/BinderTransportTest.java index 6507b940b0b..a7f91fae013 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 void serverAlreadyListening() throws Exception { // 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 a45d98de9c9..fc65fb11428 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 @@ private static boolean checkPackageSignature( 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 960fa162ed1..035b1dfc900 100644 --- a/buildscripts/checkstyle.xml +++ b/buildscripts/checkstyle.xml @@ -202,7 +202,7 @@ - diff --git a/core/src/main/java/io/grpc/internal/DelayedClientTransport.java b/core/src/main/java/io/grpc/internal/DelayedClientTransport.java index 0be8eec309a..11171e94c52 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 28ce2764c75..cc9dd0effc7 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 2ba9e349994..c1ea164ec92 100644 --- a/core/src/main/java/io/grpc/internal/ManagedChannelImpl.java +++ b/core/src/main/java/io/grpc/internal/ManagedChannelImpl.java @@ -203,7 +203,7 @@ public void uncaughtException(Thread t, Throwable e) { 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 73133a339e4..7044b4e17fc 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 @@ private void schedule(@Nullable Runnable removable) { // 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 9c245f615da..14d3fddd290 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 void maybeChooseServiceConfig_clientLanguageCaseInsensitive() { } @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 void maybeChooseServiceConfig_clientLanguageCaseSensitive() { } @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 void shouldUseJndi_falseIfDisabledForLocalhost() { } @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 05dc4549a0e..f7631c34c0d 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 void shutdownBeforeTransportCreated() throws Exception { // 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 6c1156f33eb..3125edca1e6 100644 --- a/core/src/test/java/io/grpc/internal/ServerImplTest.java +++ b/core/src/test/java/io/grpc/internal/ServerImplTest.java @@ -972,7 +972,7 @@ public void shutdown() { } 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 void handlerRegistryPriorities() throws Exception { 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 531632ca79c..d27195e2490 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 void close(ResourceInstance instance) { 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 5420678d036..4165064b4b1 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 void sayHello_dynamicHostname() throws Exception { 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/rls/src/main/java/io/grpc/rls/CachingRlsLbClient.java b/rls/src/main/java/io/grpc/rls/CachingRlsLbClient.java index 5263975b49d..f01ed6b2b30 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 @@ private CachingRlsLbClient(Builder builder) { } /** - * 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/stub/src/test/java/io/grpc/stub/ClientCallsTest.java b/stub/src/test/java/io/grpc/stub/ClientCallsTest.java index 28801874ea1..f3d101b862a 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 void cancel(String message, Throwable cause) { future.get(); fail("Should fail"); } catch (CancellationException e) { - // Exepcted + // Expected } } From 9dc6edf22589e39694fec282eb161b3ff7abc0a1 Mon Sep 17 00:00:00 2001 From: yinpeng Date: Fri, 3 May 2024 00:33:06 +0800 Subject: [PATCH 4/4] revert code --- .../src/main/proto/grpc/reflection/v1alpha/reflection.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/src/main/proto/grpc/reflection/v1alpha/reflection.proto b/services/src/main/proto/grpc/reflection/v1alpha/reflection.proto index b417bd111ab..8c5e06fe148 100644 --- a/services/src/main/proto/grpc/reflection/v1alpha/reflection.proto +++ b/services/src/main/proto/grpc/reflection/v1alpha/reflection.proto @@ -80,7 +80,7 @@ message ExtensionRequest { message ServerReflectionResponse { string valid_host = 1; ServerReflectionRequest original_request = 2; - // The server set one of the following fields according to the message_request + // The server set one of the following fields accroding to the message_request // in the request. oneof message_response { // This message is used to answer file_by_filename, file_containing_symbol,