Skip to content

Commit 6ec744f

Browse files
authoredMay 7, 2024··
Fix various typos (#11144)
1 parent 354b028 commit 6ec744f

File tree

28 files changed

+37
-37
lines changed

28 files changed

+37
-37
lines changed
 

‎SECURITY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ with OpenSSL](#tls-with-netty-tcnative-on-openssl) are other valid options.
8484
[Apache Tomcat's tcnative](https://tomcat.apache.org/native-doc/) and is a JNI
8585
wrapper around OpenSSL/BoringSSL/LibreSSL.
8686

87-
We recommend BoringSSL for its simplicitly and low occurrence of security
87+
We recommend BoringSSL for its simplicity and low occurrence of security
8888
vulnerabilities relative to OpenSSL. BoringSSL is used by Conscrypt as well.
8989

9090
### TLS with netty-tcnative on BoringSSL

‎alts/src/main/java/io/grpc/alts/AltsChannelBuilder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
/**
3131
* ALTS version of {@code ManagedChannelBuilder}. This class sets up a secure and authenticated
32-
* commmunication between two cloud VMs using ALTS.
32+
* communication between two cloud VMs using ALTS.
3333
*/
3434
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4151")
3535
public final class AltsChannelBuilder extends ForwardingChannelBuilder2<AltsChannelBuilder> {

‎alts/src/main/java/io/grpc/alts/AltsChannelCredentials.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import java.util.logging.Logger;
3737

3838
/**
39-
* Provides secure and authenticated commmunication between two cloud VMs using ALTS.
39+
* Provides secure and authenticated communication between two cloud VMs using ALTS.
4040
*/
4141
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4151")
4242
public final class AltsChannelCredentials {

‎alts/src/test/java/io/grpc/alts/internal/FakeTsiHandshaker.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public void getBytesToSendToPeer(ByteBuffer bytes) throws GeneralSecurityExcepti
147147
return;
148148
}
149149

150-
// Prepare the next message, if neeeded.
150+
// Prepare the next message, if needed.
151151
if (sendBuffer == null) {
152152
if (sendState.next() != receiveState) {
153153
// We're still waiting for bytes from the peer, so bail.

‎api/src/main/java/io/grpc/ServerInterceptors.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public static <T> ServerServiceDefinition useMarshalledMessages(
197197
* to allow for interceptors to handle messages as multiple different ReqT/RespT types within
198198
* the chain if the added cost of serialization is not a concern.
199199
*
200-
* @param serviceDef the sevice definition to add request and response marshallers to.
200+
* @param serviceDef the service definition to add request and response marshallers to.
201201
* @param requestMarshaller request marshaller
202202
* @param responseMarshaller response marshaller
203203
* @param <ReqT> the request payload type

‎api/src/main/java/io/grpc/SynchronizationContext.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public String toString() {
163163
}
164164

165165
/**
166-
* Schedules a task to be added and run via {@link #execute} after an inital delay and then
166+
* Schedules a task to be added and run via {@link #execute} after an initial delay and then
167167
* repeated after the delay until cancelled.
168168
*
169169
* @param task the task being scheduled

‎api/src/test/java/io/grpc/MethodDescriptorTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void idempotent() {
6767

6868
assertFalse(descriptor.isIdempotent());
6969

70-
// Create a new desriptor by setting idempotent to true
70+
// Create a new descriptor by setting idempotent to true
7171
MethodDescriptor<String, String> newDescriptor =
7272
descriptor.toBuilder().setIdempotent(true).build();
7373
assertTrue(newDescriptor.isIdempotent());
@@ -86,7 +86,7 @@ public void safe() {
8686
.build();
8787
assertFalse(descriptor.isSafe());
8888

89-
// Create a new desriptor by setting safe to true
89+
// Create a new descriptor by setting safe to true
9090
MethodDescriptor<String, String> newDescriptor = descriptor.toBuilder().setSafe(true).build();
9191
assertTrue(newDescriptor.isSafe());
9292
// All other fields should staty the same

‎binder/src/androidTest/java/io/grpc/binder/internal/BinderTransportTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public void serverAlreadyListening() throws Exception {
136136
// refers to an Android Service class declared in an applications manifest.
137137
//
138138
// However, unlike a regular network server, which is responsible for listening on its port, a
139-
// BinderServier is not responsible for the creation of its host Service. The opposite is
139+
// BinderServer is not responsible for the creation of its host Service. The opposite is
140140
// the case, with the host Android Service (itself created by the Android platform in
141141
// response to a connection) building the gRPC server.
142142
//

‎binder/src/main/java/io/grpc/binder/SecurityPolicies.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ private static boolean checkPackageSignature(
321321
packageInfo = packageManager.getPackageInfo(packageName, PackageManager.GET_SIGNATURES);
322322
if (packageInfo.signatures == null || packageInfo.signatures.length != 1) {
323323
// Reject multiply-signed apks because of b/13678484
324-
// (See PackageManagerGetSignatures supression above).
324+
// (See PackageManagerGetSignatures suppression above).
325325
return false;
326326
}
327327

‎buildscripts/checkstyle.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
<property name="accessModifiers" value="public"/>
203203
<property name="allowMissingParamTags" value="true"/>
204204
<property name="allowMissingReturnTag" value="true"/>
205-
<!-- TOOD(ejona): Too restrictive for tests
205+
<!-- TODO(ejona): Too restrictive for tests
206206
<property name="allowedAnnotations" value="Override, Test"/-->
207207
<property name="allowedAnnotations" value="Override, Test, Before, After, BeforeClass, AfterClass, Setup, TearDown"/>
208208
</module>

‎core/src/main/java/io/grpc/internal/ClientTransport.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ ClientStream newStream(
6161
* Pings a remote endpoint. When an acknowledgement is received, the given callback will be
6262
* invoked using the given executor.
6363
*
64-
* <p>Pings are not necessarily sent to the same endpont, thus a successful ping only means at
64+
* <p>Pings are not necessarily sent to the same endpoint, thus a successful ping only means at
6565
* least one endpoint responded, but doesn't imply the availability of other endpoints (if there
6666
* is any).
6767
*

‎core/src/main/java/io/grpc/internal/DelayedClientTransport.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ final class DelayedClientTransport implements ManagedClientTransport {
9090
/**
9191
* Creates a new delayed transport.
9292
*
93-
* @param defaultAppExecutor pending streams will create real streams and run bufferred operations
93+
* @param defaultAppExecutor pending streams will create real streams and run buffered operations
9494
* in an application executor, which will be this executor, unless there is on provided in
9595
* {@link CallOptions}.
9696
* @param syncContext all listener callbacks of the delayed transport will be run from this

‎core/src/main/java/io/grpc/internal/DelayedStream.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class DelayedStream implements ClientStream {
4646
private volatile boolean passThrough;
4747
/**
4848
* Non-{@code null} iff start has been called. Used to assert methods are called in appropriate
49-
* order, but also used if an error occurrs before {@code realStream} is set.
49+
* order, but also used if an error occurs before {@code realStream} is set.
5050
*/
5151
private ClientStreamListener listener;
5252
/** Must hold {@code this} lock when setting. */

‎core/src/main/java/io/grpc/internal/ManagedChannelImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public void uncaughtException(Thread t, Throwable e) {
196196
private final CompressorRegistry compressorRegistry;
197197

198198
private final Supplier<Stopwatch> stopwatchSupplier;
199-
/** The timout before entering idle mode. */
199+
/** The timeout before entering idle mode. */
200200
private final long idleTimeoutMillis;
201201

202202
private final ConnectivityStateManager channelStateManager = new ConnectivityStateManager();

‎core/src/main/java/io/grpc/internal/SerializingExecutor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private void schedule(@Nullable Runnable removable) {
113113
// ConcurrentLinkedQueue claims that null elements are not allowed, but seems to not
114114
// throw if the item to remove is null. If removable is present in the queue twice,
115115
// the wrong one may be removed. It doesn't seem possible for this case to exist today.
116-
// This is important to run in case of RejectedExectuionException, so that future calls
116+
// This is important to run in case of RejectedExecutionException, so that future calls
117117
// to execute don't succeed and accidentally run a previous runnable.
118118
runQueue.remove(removable);
119119
}

‎core/src/test/java/io/grpc/internal/DnsNameResolverTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ public void maybeChooseServiceConfig_clientLanguageCaseInsensitive() {
930930
}
931931

932932
@Test
933-
public void maybeChooseServiceConfig_clientLanguageMatchesEmtpy() {
933+
public void maybeChooseServiceConfig_clientLanguageMatchesEmpty() {
934934
Map<String, Object> choice = new LinkedHashMap<>();
935935
List<String> langs = new ArrayList<>();
936936
choice.put("clientLanguage", langs);
@@ -1099,7 +1099,7 @@ public void maybeChooseServiceConfig_clientLanguageCaseSensitive() {
10991099
}
11001100

11011101
@Test
1102-
public void maybeChooseServiceConfig_hostnameMatchesEmtpy() {
1102+
public void maybeChooseServiceConfig_hostnameMatchesEmpty() {
11031103
Map<String, Object> choice = new LinkedHashMap<>();
11041104
List<String> hosts = new ArrayList<>();
11051105
choice.put("clientHostname", hosts);
@@ -1191,7 +1191,7 @@ public void shouldUseJndi_falseIfDisabledForLocalhost() {
11911191
}
11921192

11931193
@Test
1194-
public void shouldUseJndi_trueIfLocalhostOverriden() {
1194+
public void shouldUseJndi_trueIfLocalhostOverridden() {
11951195
boolean enableJndi = true;
11961196
boolean enableJndiLocalhost = true;
11971197
String host = "localhost";

‎core/src/test/java/io/grpc/internal/InternalSubchannelTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ public void shutdownBeforeTransportCreated() throws Exception {
964964
// This should not lead to the creation of a new transport.
965965
reconnectTask.command.run();
966966

967-
// Futher call to obtainActiveTransport() is no-op.
967+
// Further call to obtainActiveTransport() is no-op.
968968
assertNull(internalSubchannel.obtainActiveTransport());
969969
assertEquals(SHUTDOWN, internalSubchannel.getState());
970970
assertNoCallbackInvoke();

‎core/src/test/java/io/grpc/internal/ServerImplTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ public void shutdown() {
932932
} catch (Exception ex) {
933933
throw new AssertionError(ex);
934934
}
935-
// If deadlock is possible with this setup, this sychronization completes the loop because
935+
// If deadlock is possible with this setup, this synchronization completes the loop because
936936
// the serverShutdown needs a lock that Server is holding while calling this method.
937937
synchronized (lock) {
938938
}
@@ -972,7 +972,7 @@ public void shutdown() {
972972
} catch (Exception ex) {
973973
throw new AssertionError(ex);
974974
}
975-
// If deadlock is possible with this setup, this sychronization completes the loop
975+
// If deadlock is possible with this setup, this synchronization completes the loop
976976
// because the transportTerminated needs a lock that Server is holding while calling this
977977
// method.
978978
synchronized (lock) {
@@ -1298,7 +1298,7 @@ public void handlerRegistryPriorities() throws Exception {
12981298
assertEquals(1, executor.runDueTasks());
12991299
verify(callHandler).startCall(ArgumentMatchers.<ServerCall<String, Integer>>any(),
13001300
ArgumentMatchers.<Metadata>any());
1301-
// This call will be handled by the fallbackRegistry because it's not registred in the internal
1301+
// This call will be handled by the fallbackRegistry because it's not registered in the internal
13021302
// registry.
13031303
transportListener.streamCreated(stream, "Service1/Method2", requestHeaders);
13041304
assertEquals(1, executor.runDueTasks());

‎core/src/test/java/io/grpc/internal/SharedResourceHolderTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public void close(ResourceInstance instance) {
9898
assertEquals(SharedResourceHolder.DESTROY_DELAY_SECONDS,
9999
scheduledDestroyTask.getDelay(TimeUnit.SECONDS));
100100

101-
// Simluate that the destroyer executes the foo destroying task
101+
// Simulate that the destroyer executes the foo destroying task
102102
scheduledDestroyTask.runTask();
103103
assertTrue(sharedFoo.closed);
104104

‎examples/example-hostname/src/test/java/io/grpc/examples/hostname/HostnameGreeterTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void sayHello_dynamicHostname() throws Exception {
6262
InProcessServerBuilder.forName("hostname")
6363
.directExecutor().addService(new HostnameGreeter(null)).build().start());
6464

65-
// Just verifing the service doesn't crash
65+
// Just verifying the service doesn't crash
6666
HelloReply reply =
6767
blockingStub.sayHello(HelloRequest.newBuilder().setName("anonymous").build());
6868
assertTrue(reply.getMessage(), reply.getMessage().startsWith("Hello anonymous, from "));

‎grpclb/src/main/java/io/grpc/grpclb/GrpclbConfig.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ long getFallbackTimeoutMs() {
5555
}
5656

5757
/**
58-
* If specified, it overrides the name of the sevice name to be sent to the balancer. if not, the
58+
* If specified, it overrides the name of the service name to be sent to the balancer. if not, the
5959
* target to be sent to the balancer will continue to be obtained from the target URI passed
6060
* to the gRPC client channel.
6161
*/

‎interop-testing/src/main/java/io/grpc/testing/integration/TestServiceClient.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ private void runTest(TestCases testCase) throws Exception {
526526

527527
/* Parses input string as a semi-colon-separated list of colon-separated key/value pairs.
528528
* Allow any character but semicolons in values.
529-
* If the string is emtpy, return null.
529+
* If the string is empty, return null.
530530
* Otherwise, return a client interceptor which inserts the provided metadata.
531531
*/
532532
@Nullable

‎netty/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ dependencies {
7272
import net.ltgt.gradle.errorprone.CheckSeverity
7373

7474
[tasks.named("compileJava"), tasks.named("compileTestJava")]*.configure {
75-
// Netty retuns a lot of futures that we mostly don't care about.
75+
// Netty returns a lot of futures that we mostly don't care about.
7676
options.errorprone.check("FutureReturnValueIgnored", CheckSeverity.OFF)
7777
}
7878

‎rls/src/main/java/io/grpc/rls/CachingRlsLbClient.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ private CachingRlsLbClient(Builder builder) {
206206
}
207207

208208
/**
209-
* Convert the status to UNAVAILBLE and enhance the error message.
209+
* Convert the status to UNAVAILABLE and enhance the error message.
210210
* @param status status as provided by server
211211
* @param serverName Used for error description
212212
* @return Transformed status

‎services/src/test/java/io/grpc/protobuf/services/BinlogHelperTest.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ public void logRpcMessage() throws Exception {
888888
verify(sink).write(base);
889889
}
890890

891-
// server messsage
891+
// server message
892892
{
893893
sinkWriterImpl.logRpcMessage(
894894
seq,
@@ -1433,16 +1433,16 @@ public ServerCall.Listener<byte[]> startCall(
14331433

14341434
// send server header
14351435
{
1436-
Metadata serverInital = new Metadata();
1437-
interceptedCall.get().sendHeaders(serverInital);
1436+
Metadata serverInitial = new Metadata();
1437+
interceptedCall.get().sendHeaders(serverInitial);
14381438
verify(mockSinkWriter).logServerHeader(
14391439
/*seq=*/ eq(2L),
1440-
same(serverInital),
1440+
same(serverInitial),
14411441
eq(Logger.LOGGER_SERVER),
14421442
eq(CALL_ID),
14431443
ArgumentMatchers.<SocketAddress>isNull());
14441444
verifyNoMoreInteractions(mockSinkWriter);
1445-
assertSame(serverInital, actualServerInitial.get());
1445+
assertSame(serverInitial, actualServerInitial.get());
14461446
}
14471447

14481448
// receive client msg

‎services/src/test/java/io/grpc/protobuf/services/HealthCheckingLoadBalancerFactoryTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public void typicalWorkflow() {
273273
verifyNoMoreInteractions(origLb);
274274
Subchannel[] wrappedSubchannels = new Subchannel[NUM_SUBCHANNELS];
275275

276-
// Simulate that the orignal LB creates Subchannels
276+
// Simulate that the original LB creates Subchannels
277277
for (int i = 0; i < NUM_SUBCHANNELS; i++) {
278278
// Subchannel attributes set by origLb are correctly plumbed in
279279
String subchannelAttrValue = "eag attr " + i;

‎stub/src/test/java/io/grpc/stub/ClientCallsTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ public void cancel(String message, Throwable cause) {
399399
future.get();
400400
fail("Should fail");
401401
} catch (CancellationException e) {
402-
// Exepcted
402+
// Expected
403403
}
404404
}
405405

‎xds/src/main/java/io/grpc/xds/FilterChainMatchingProtocolNegotiators.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ private static int getMatchingPrefixLength(
329329
// use prefix_ranges (CIDR) and get the most specific matches
330330
private static Collection<FilterChain> filterOnIpAddress(
331331
Collection<FilterChain> filterChains, InetAddress address, boolean forDestination) {
332-
// curent list of top ones
332+
// current list of top ones
333333
ArrayList<FilterChain> topOnes = new ArrayList<>(filterChains.size());
334334
int topMatchingPrefixLen = -1;
335335
for (FilterChain filterChain : filterChains) {

0 commit comments

Comments
 (0)
Please sign in to comment.