From cd9a50a251bfc74cc17ab1555263c1ccb30a1a54 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Sat, 10 Oct 2026 15:52:36 +0200 Subject: [PATCH] Fix wording for SpEL byte array length example --- .../modules/ROOT/pages/core/expressions/evaluation.adoc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/framework-docs/modules/ROOT/pages/core/expressions/evaluation.adoc b/framework-docs/modules/ROOT/pages/core/expressions/evaluation.adoc index 1db4a58bf3e..9f1941bd209 100644 --- a/framework-docs/modules/ROOT/pages/core/expressions/evaluation.adoc +++ b/framework-docs/modules/ROOT/pages/core/expressions/evaluation.adoc @@ -104,7 +104,8 @@ SpEL also supports nested properties by using the standard dot notation (such as `prop1.prop2.prop3`) as well as the corresponding setting of property values. Public fields may also be accessed. -The following example shows how to use dot notation to get the length of a string literal. +The following example shows how to use dot notation to get the number of bytes in the +platform-encoded form of a string literal. [tabs] ====== @@ -118,7 +119,7 @@ Java:: Expression exp = parser.parseExpression("'Hello World'.bytes.length"); // <1> int length = (Integer) exp.getValue(); ---- -<1> `'Hello World'.bytes.length` gives the length of the literal. +<1> `'Hello World'.bytes.length` gives the number of bytes in the literal's byte array. Kotlin:: + @@ -130,7 +131,7 @@ Kotlin:: val exp = parser.parseExpression("'Hello World'.bytes.length") // <1> val length = exp.value as Int ---- -<1> `'Hello World'.bytes.length` gives the length of the literal. +<1> `'Hello World'.bytes.length` gives the number of bytes in the literal's byte array. ====== The String's constructor can be called instead of using a string literal, as the following