From dca55236c48f9c3529f33a9c0e81ce6759f2af15 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Fri, 30 Aug 2024 11:24:39 +0200 Subject: [PATCH] Stop documenting use of -debug compiler flag in reference manual Closes gh-33453 --- .../ROOT/pages/core/beans/context-introduction.adoc | 6 +++--- .../beans/dependencies/factory-collaborators.adoc | 4 ++-- .../dependencies/factory-properties-detailed.adoc | 2 +- .../ROOT/pages/integration/cache/annotations.adoc | 11 ++++++----- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/framework-docs/modules/ROOT/pages/core/beans/context-introduction.adoc b/framework-docs/modules/ROOT/pages/core/beans/context-introduction.adoc index 4975c892e34..775b3cbe10f 100644 --- a/framework-docs/modules/ROOT/pages/core/beans/context-introduction.adoc +++ b/framework-docs/modules/ROOT/pages/core/beans/context-introduction.adoc @@ -644,7 +644,7 @@ Each `SpEL` expression evaluates against a dedicated context. The following tabl items made available to the context so that you can use them for conditional event processing: [[context-functionality-events-annotation-tbl]] -.Event SpEL available metadata +.Event metadata available in SpEL expressions |=== | Name| Location| Description| Example @@ -660,8 +660,8 @@ items made available to the context so that you can use them for conditional eve | __Argument name__ | evaluation context -| The name of any of the method arguments. If, for some reason, the names are not available - (for example, because there is no debug information in the compiled byte code), individual +| The name of a particular method argument. If the names are not available + (for example, because the code was compiled without the `-parameters` flag), individual arguments are also available using the `#a<#arg>` syntax where `<#arg>` stands for the argument index (starting from 0). | `#blEvent` or `#a0` (you can also use `#p0` or `#p<#arg>` parameter notation as an alias) diff --git a/framework-docs/modules/ROOT/pages/core/beans/dependencies/factory-collaborators.adoc b/framework-docs/modules/ROOT/pages/core/beans/dependencies/factory-collaborators.adoc index 4bc08e9bfa0..ad4358b3a03 100644 --- a/framework-docs/modules/ROOT/pages/core/beans/dependencies/factory-collaborators.adoc +++ b/framework-docs/modules/ROOT/pages/core/beans/dependencies/factory-collaborators.adoc @@ -211,8 +211,8 @@ example shows: ---- Keep in mind that, to make this work out of the box, your code must be compiled with the -debug flag enabled so that Spring can look up the parameter name from the constructor. -If you cannot or do not want to compile your code with the debug flag, you can use the +`-parameters` flag enabled so that Spring can look up the parameter name from the constructor. +If you cannot or do not want to compile your code with the `-parameters` flag, you can use the https://download.oracle.com/javase/8/docs/api/java/beans/ConstructorProperties.html[@ConstructorProperties] JDK annotation to explicitly name your constructor arguments. The sample class would then have to look as follows: diff --git a/framework-docs/modules/ROOT/pages/core/beans/dependencies/factory-properties-detailed.adoc b/framework-docs/modules/ROOT/pages/core/beans/dependencies/factory-properties-detailed.adoc index a31499d5e26..ded99ad42d0 100644 --- a/framework-docs/modules/ROOT/pages/core/beans/dependencies/factory-properties-detailed.adoc +++ b/framework-docs/modules/ROOT/pages/core/beans/dependencies/factory-properties-detailed.adoc @@ -582,7 +582,7 @@ it needs to be declared in the XML file even though it is not defined in an XSD (it exists inside the Spring core). For the rare cases where the constructor argument names are not available (usually if -the bytecode was compiled without debugging information), you can use fallback to the +the bytecode was compiled without the `-parameters` flag), you can fall back to the argument indexes, as follows: [source,xml,indent=0,subs="verbatim,quotes"] diff --git a/framework-docs/modules/ROOT/pages/integration/cache/annotations.adoc b/framework-docs/modules/ROOT/pages/integration/cache/annotations.adoc index 9acd169a1d1..b25668ef5c4 100644 --- a/framework-docs/modules/ROOT/pages/integration/cache/annotations.adoc +++ b/framework-docs/modules/ROOT/pages/integration/cache/annotations.adoc @@ -332,7 +332,7 @@ metadata, such as the argument names. The following table describes the items ma available to the context so that you can use them for key and conditional computations: [[cache-spel-context-tbl]] -.Cache SpEL available metadata +.Cache metadata available in SpEL expressions |=== | Name| Location| Description| Example @@ -358,7 +358,7 @@ available to the context so that you can use them for key and conditional comput | `args` | Root object -| The arguments (as array) used for invoking the target +| The arguments (as an object array) used for invoking the target | `#root.args[0]` | `caches` @@ -368,9 +368,10 @@ available to the context so that you can use them for key and conditional comput | Argument name | Evaluation context -| Name of any of the method arguments. If the names are not available - (perhaps due to having no debug information), the argument names are also available under the `#a<#arg>` - where `#arg` stands for the argument index (starting from `0`). +| The name of a particular method argument. If the names are not available + (for example, because the code was compiled without the `-parameters` flag), individual + arguments are also available using the `#a<#arg>` syntax where `<#arg>` stands for the + argument index (starting from 0). | `#iban` or `#a0` (you can also use `#p0` or `#p<#arg>` notation as an alias). | `result`