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 #11324

Merged
merged 1 commit into from
Jun 12, 2022
Merged

fix typo #11324

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/play/src/main/java/play/ApplicationLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public Application load(Context context) {
/**
* Load an application given the context.
*
* @param context the context the apps hould be loaded into
* @param context the context the apps should be loaded into
* @return the loaded application
*/
Application load(ApplicationLoader.Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class MappedJavaHandlerComponents implements JavaHandlerComponents {
private final JavaContextComponents contextComponents;

private final Map<Class<? extends Action<?>>, Supplier<Action<?>>> actions = new HashMap<>();
private final Map<Class<? extends BodyParser<?>>, Supplier<BodyParser<?>>> bodyPasers =
private final Map<Class<? extends BodyParser<?>>, Supplier<BodyParser<?>>> bodyParsers =
new HashMap<>();

public MappedJavaHandlerComponents(
Expand All @@ -55,7 +55,7 @@ public MappedJavaHandlerComponents(
@Override
@SuppressWarnings("unchecked")
public <A extends BodyParser<?>> A getBodyParser(Class<A> parserClass) {
return (A) this.bodyPasers.get(parserClass).get();
return (A) this.bodyParsers.get(parserClass).get();
}

@Override
Expand Down Expand Up @@ -93,7 +93,7 @@ public <A extends Action<?>> MappedJavaHandlerComponents addAction(

public <B extends BodyParser<?>> MappedJavaHandlerComponents addBodyParser(
Class<B> clazz, Supplier<B> bodyParserSupplier) {
bodyPasers.put(clazz, widenSupplier(bodyParserSupplier));
bodyParsers.put(clazz, widenSupplier(bodyParserSupplier));
return this;
}

Expand Down
2 changes: 1 addition & 1 deletion core/play/src/main/java/play/i18n/Lang.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static List<Lang> availables(Application app) {
* Guess the preferred lang in the langs set passed as argument. The first Lang that matches an
* available Lang wins, otherwise returns the first Lang available in this application.
*
* @param app the currept application
* @param app the current application
* @param availableLangs the set of langs from which to guess the preferred
* @return the preferred lang.
*/
Expand Down
2 changes: 1 addition & 1 deletion core/play/src/main/java/play/mvc/Http.java
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,7 @@ public JsonNode asJson() {
* [[Json.fromJson(JsonNode,Class)]].
*
* <p>Will return Optional.empty() if the request body is not an instance of JsonNode. If the
* JsonNode simply has missing fields, a valid reference with null fields is returne.
* JsonNode simply has missing fields, a valid reference with null fields is return.
*
* @param <A> The type to convert the JSON value to.
* @param clazz The class to convert the JSON value to.
Expand Down
2 changes: 1 addition & 1 deletion core/play/src/main/scala/play/api/mvc/RequestHeader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import play.api.mvc.request._
import scala.annotation.implicitNotFound

/**
* The HTTP request header. Note that it doesnt contain the request body yet.
* The HTTP request header. Note that it doesn't contain the request body yet.
*/
@implicitNotFound("Cannot find any HTTP Request Header here")
trait RequestHeader {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Now you can use it like so.

@[streams1](code/javaguide/async/JavaWebSockets.java)

A `WebSocket` has access to the request headers (from the HTTP request that initiates the WebSocket connection), allowing you to retrieve standard headers and session data. However, it doesnt have access to a request body, nor to the HTTP response.
A `WebSocket` has access to the request headers (from the HTTP request that initiates the WebSocket connection), allowing you to retrieve standard headers and session data. However, it doesn't have access to a request body, nor to the HTTP response.

It this example we are creating a simple sink that prints each message to console. To send messages, we create a simple source that will send a single **Hello!** message. We also need to concatenate a source that will never send anything, otherwise our single source will terminate the flow, and thus the connection.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ For this kind of response we have to use **Chunked transfer encoding**.
>
> <https://en.wikipedia.org/wiki/Chunked_transfer_encoding>

The advantage is that we can serve the data **live**, meaning that we send chunks of data as soon as they are available. The drawback is that since the web browser doesnt know the content size, it is not able to display a proper download progress bar.
The advantage is that we can serve the data **live**, meaning that we send chunks of data as soon as they are available. The drawback is that since the web browser doesn't know the content size, it is not able to display a proper download progress bar.

Let’s say that we have a service somewhere that provides a dynamic `InputStream` computing some data. First we have to create an `Source` for this stream:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Actors are not always the right abstraction for handling WebSockets, particularl

@[streams1](code/ScalaWebSockets.scala)

A `WebSocket` has access to the request headers (from the HTTP request that initiates the WebSocket connection), allowing you to retrieve standard headers and session data. However, it doesnt have access to a request body, nor to the HTTP response.
A `WebSocket` has access to the request headers (from the HTTP request that initiates the WebSocket connection), allowing you to retrieve standard headers and session data. However, it doesn't have access to a request body, nor to the HTTP response.

In this example we are creating a simple sink that prints each message to console. To send messages, we create a simple source that will send a single **Hello!** message. We also need to concatenate a source that will never send anything, otherwise our single source will terminate the flow, and thus the connection.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Here is an example of usage (from a controller):

The OpenID of a user gives you his identity. The protocol also supports getting [extended attributes](https://openid.net/specs/openid-attribute-exchange-1_0.html) such as the e-mail address, the first name, or the last name.

You may request *optional* attributes and/or *required* attributes from the OpenID server. Asking for required attributes means the user cannot login to your service if he doesnt provides them.
You may request *optional* attributes and/or *required* attributes from the OpenID server. Asking for required attributes means the user cannot login to your service if he doesn't provides them.

Extended attributes are requested in the redirect URL:

Expand Down