diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/package-info.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/package-info.java index 61c18eae449..2907d6c3322 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/package-info.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/package-info.java @@ -1,5 +1,5 @@ /** - * Generic support for SImple Messaging Protocols including protocols such as STOMP. + * Generic support for Simple Messaging Protocols including protocols such as STOMP. */ @NonNullApi @NonNullFields diff --git a/src/docs/asciidoc/core/core-expressions.adoc b/src/docs/asciidoc/core/core-expressions.adoc index 54c687213c4..2ec37a525fc 100644 --- a/src/docs/asciidoc/core/core-expressions.adoc +++ b/src/docs/asciidoc/core/core-expressions.adoc @@ -1087,8 +1087,8 @@ the expression. A minimal example is: "false ? 'trueExp' : 'falseExp'").getValue(String.class); ---- -In this case, the boolean false results in returning the string value `'falseExp'`. A more -realistic example is shown below. +In this case, the boolean false results in returning the string value `'falseExp'`. +A more realistic example is shown below. [source,java,indent=0] [subs="verbatim,quotes"] @@ -1112,10 +1112,10 @@ ternary operator. [[expressions-operator-elvis]] === The Elvis Operator -The Elvis operator is a shortening of the ternary operator syntax and is used in the -http://www.groovy-lang.org/operators.html#_elvis_operator[Groovy] language. -With the ternary operator syntax you usually have to repeat a variable twice, for -example: +The Elvis operator is a shortening of the ternary operator syntax and is used in +the http://www.groovy-lang.org/operators.html#_elvis_operator[Groovy] language. +With the ternary operator syntax, you usually have to repeat a variable twice, +as the following example shows: [source,groovy,indent=0] [subs="verbatim,quotes"] @@ -1124,7 +1124,8 @@ example: String displayName = (name != null ? name : "Unknown"); ---- -Instead you can use the Elvis operator, named for the resemblance to Elvis' hair style. +Instead, you can use the Elvis operator (named for the resemblance to Elvis' hair style). +The following example shows how to use the Elvis operator: [source,java,indent=0] [subs="verbatim,quotes"] @@ -1135,7 +1136,7 @@ Instead you can use the Elvis operator, named for the resemblance to Elvis' hair System.out.println(name); // 'Unknown' ---- -Here is a more complex example. +The following listing shows a more complex example: [source,java,indent=0] [subs="verbatim,quotes"]