From c61459cd5bea1a7d7d38aa4bd59b3b074b3650ef Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Sun, 12 Jun 2022 10:24:09 +0900 Subject: [PATCH] fix typo --- core/play/src/main/java/play/ApplicationLoader.java | 2 +- .../main/java/play/core/j/MappedJavaHandlerComponents.java | 6 +++--- core/play/src/main/java/play/i18n/Lang.java | 2 +- core/play/src/main/java/play/mvc/Http.java | 2 +- core/play/src/main/scala/play/api/mvc/RequestHeader.scala | 2 +- .../manual/working/javaGuide/main/async/JavaWebSockets.md | 2 +- .../manual/working/scalaGuide/main/async/ScalaStream.md | 2 +- .../manual/working/scalaGuide/main/async/ScalaWebSockets.md | 2 +- .../manual/working/scalaGuide/main/ws/ScalaOpenID.md | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/play/src/main/java/play/ApplicationLoader.java b/core/play/src/main/java/play/ApplicationLoader.java index 7ae89d2f19d..6383cf3484a 100644 --- a/core/play/src/main/java/play/ApplicationLoader.java +++ b/core/play/src/main/java/play/ApplicationLoader.java @@ -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); diff --git a/core/play/src/main/java/play/core/j/MappedJavaHandlerComponents.java b/core/play/src/main/java/play/core/j/MappedJavaHandlerComponents.java index 6d661c94bc5..923c103ef96 100644 --- a/core/play/src/main/java/play/core/j/MappedJavaHandlerComponents.java +++ b/core/play/src/main/java/play/core/j/MappedJavaHandlerComponents.java @@ -29,7 +29,7 @@ public class MappedJavaHandlerComponents implements JavaHandlerComponents { private final JavaContextComponents contextComponents; private final Map>, Supplier>> actions = new HashMap<>(); - private final Map>, Supplier>> bodyPasers = + private final Map>, Supplier>> bodyParsers = new HashMap<>(); public MappedJavaHandlerComponents( @@ -55,7 +55,7 @@ public MappedJavaHandlerComponents( @Override @SuppressWarnings("unchecked") public > A getBodyParser(Class parserClass) { - return (A) this.bodyPasers.get(parserClass).get(); + return (A) this.bodyParsers.get(parserClass).get(); } @Override @@ -93,7 +93,7 @@ public > MappedJavaHandlerComponents addAction( public > MappedJavaHandlerComponents addBodyParser( Class clazz, Supplier bodyParserSupplier) { - bodyPasers.put(clazz, widenSupplier(bodyParserSupplier)); + bodyParsers.put(clazz, widenSupplier(bodyParserSupplier)); return this; } diff --git a/core/play/src/main/java/play/i18n/Lang.java b/core/play/src/main/java/play/i18n/Lang.java index eff9b953699..335a8bdac07 100644 --- a/core/play/src/main/java/play/i18n/Lang.java +++ b/core/play/src/main/java/play/i18n/Lang.java @@ -83,7 +83,7 @@ public static List 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. */ diff --git a/core/play/src/main/java/play/mvc/Http.java b/core/play/src/main/java/play/mvc/Http.java index 54fb391dafa..b851b10fe4f 100644 --- a/core/play/src/main/java/play/mvc/Http.java +++ b/core/play/src/main/java/play/mvc/Http.java @@ -1602,7 +1602,7 @@ public JsonNode asJson() { * [[Json.fromJson(JsonNode,Class)]]. * *

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 The type to convert the JSON value to. * @param clazz The class to convert the JSON value to. diff --git a/core/play/src/main/scala/play/api/mvc/RequestHeader.scala b/core/play/src/main/scala/play/api/mvc/RequestHeader.scala index 7331dfa74cc..d1021e1d5d3 100644 --- a/core/play/src/main/scala/play/api/mvc/RequestHeader.scala +++ b/core/play/src/main/scala/play/api/mvc/RequestHeader.scala @@ -20,7 +20,7 @@ import play.api.mvc.request._ import scala.annotation.implicitNotFound /** - * The HTTP request header. Note that it doesn’t 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 { diff --git a/documentation/manual/working/javaGuide/main/async/JavaWebSockets.md b/documentation/manual/working/javaGuide/main/async/JavaWebSockets.md index 99d016b43ca..43714178f8f 100644 --- a/documentation/manual/working/javaGuide/main/async/JavaWebSockets.md +++ b/documentation/manual/working/javaGuide/main/async/JavaWebSockets.md @@ -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 doesn’t 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. diff --git a/documentation/manual/working/scalaGuide/main/async/ScalaStream.md b/documentation/manual/working/scalaGuide/main/async/ScalaStream.md index 9be7158df66..3dfff1e9878 100644 --- a/documentation/manual/working/scalaGuide/main/async/ScalaStream.md +++ b/documentation/manual/working/scalaGuide/main/async/ScalaStream.md @@ -72,7 +72,7 @@ For this kind of response we have to use **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 doesn’t 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: diff --git a/documentation/manual/working/scalaGuide/main/async/ScalaWebSockets.md b/documentation/manual/working/scalaGuide/main/async/ScalaWebSockets.md index 65a091b0482..9ea55c4393b 100644 --- a/documentation/manual/working/scalaGuide/main/async/ScalaWebSockets.md +++ b/documentation/manual/working/scalaGuide/main/async/ScalaWebSockets.md @@ -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 doesn’t 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. diff --git a/documentation/manual/working/scalaGuide/main/ws/ScalaOpenID.md b/documentation/manual/working/scalaGuide/main/ws/ScalaOpenID.md index 1c0e250185c..da6ba255034 100644 --- a/documentation/manual/working/scalaGuide/main/ws/ScalaOpenID.md +++ b/documentation/manual/working/scalaGuide/main/ws/ScalaOpenID.md @@ -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 doesn’t 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: