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

fix typo #11144

Merged
merged 4 commits into from
May 7, 2024
Merged

fix typo #11144

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: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion alts/src/main/java/io/grpc/alts/AltsChannelBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<AltsChannelBuilder> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/ServerInterceptors.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public static <T> 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 <ReqT> the request payload type
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/SynchronizationContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions api/src/test/java/io/grpc/MethodDescriptorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, String> newDescriptor =
descriptor.toBuilder().setIdempotent(true).build();
assertTrue(newDescriptor.isIdempotent());
Expand All @@ -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<String, String> newDescriptor = descriptor.toBuilder().setSafe(true).build();
assertTrue(newDescriptor.isSafe());
// All other fields should staty the same
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down
2 changes: 1 addition & 1 deletion binder/src/main/java/io/grpc/binder/SecurityPolicies.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion buildscripts/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
<property name="accessModifiers" value="public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<!-- TOOD(ejona): Too restrictive for tests
<!-- TODO(ejona): Too restrictive for tests
<property name="allowedAnnotations" value="Override, Test"/-->
<property name="allowedAnnotations" value="Override, Test, Before, After, BeforeClass, AfterClass, Setup, TearDown"/>
</module>
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/io/grpc/internal/ClientTransport.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
* <p>Pings are not necessarily sent to the same endpont, thus a successful ping only means at
* <p>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).
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/io/grpc/internal/DelayedStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public void uncaughtException(Thread t, Throwable e) {
private final CompressorRegistry compressorRegistry;

private final Supplier<Stopwatch> stopwatchSupplier;
/** The timout before entering idle mode. */
/** The timeout before entering idle mode. */
private final long idleTimeoutMillis;

private final ConnectivityStateManager channelStateManager = new ConnectivityStateManager();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 3 additions & 3 deletions core/src/test/java/io/grpc/internal/DnsNameResolverTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ public void maybeChooseServiceConfig_clientLanguageCaseInsensitive() {
}

@Test
public void maybeChooseServiceConfig_clientLanguageMatchesEmtpy() {
public void maybeChooseServiceConfig_clientLanguageMatchesEmpty() {
Map<String, Object> choice = new LinkedHashMap<>();
List<String> langs = new ArrayList<>();
choice.put("clientLanguage", langs);
Expand Down Expand Up @@ -1099,7 +1099,7 @@ public void maybeChooseServiceConfig_clientLanguageCaseSensitive() {
}

@Test
public void maybeChooseServiceConfig_hostnameMatchesEmtpy() {
public void maybeChooseServiceConfig_hostnameMatchesEmpty() {
Map<String, Object> choice = new LinkedHashMap<>();
List<String> hosts = new ArrayList<>();
choice.put("clientHostname", hosts);
Expand Down Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions core/src/test/java/io/grpc/internal/ServerImplTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
}
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -1298,7 +1298,7 @@ public void handlerRegistryPriorities() throws Exception {
assertEquals(1, executor.runDueTasks());
verify(callHandler).startCall(ArgumentMatchers.<ServerCall<String, Integer>>any(),
ArgumentMatchers.<Metadata>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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 "));
Expand Down
2 changes: 1 addition & 1 deletion grpclb/src/main/java/io/grpc/grpclb/GrpclbConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion netty/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion rls/src/main/java/io/grpc/rls/CachingRlsLbClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ public void logRpcMessage() throws Exception {
verify(sink).write(base);
}

// server messsage
// server message
{
sinkWriterImpl.logRpcMessage(
seq,
Expand Down Expand Up @@ -1433,16 +1433,16 @@ public ServerCall.Listener<byte[]> 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.<SocketAddress>isNull());
verifyNoMoreInteractions(mockSinkWriter);
assertSame(serverInital, actualServerInitial.get());
assertSame(serverInitial, actualServerInitial.get());
}

// receive client msg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion stub/src/test/java/io/grpc/stub/ClientCallsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public void cancel(String message, Throwable cause) {
future.get();
fail("Should fail");
} catch (CancellationException e) {
// Exepcted
// Expected
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ private static int getMatchingPrefixLength(
// use prefix_ranges (CIDR) and get the most specific matches
private static Collection<FilterChain> filterOnIpAddress(
Collection<FilterChain> filterChains, InetAddress address, boolean forDestination) {
// curent list of top ones
// current list of top ones
ArrayList<FilterChain> topOnes = new ArrayList<>(filterChains.size());
int topMatchingPrefixLen = -1;
for (FilterChain filterChain : filterChains) {
Expand Down
Loading