Polish SpEL documentation

Issue: SPR-14243
This commit is contained in:
Stephane Nicoll
2016-05-27 10:30:38 +02:00
parent abfe3f209d
commit 917948deac

View File

@@ -785,7 +785,7 @@ expression based `matches` operator.
----
// evaluates to false
boolean falseValue = parser.parseExpression(
"'xyz' instanceof T(int)").getValue(Boolean.class);
"'xyz' instanceof T(Integer.class)").getValue(Boolean.class);
// evaluates to true
boolean trueValue = parser.parseExpression(
@@ -796,6 +796,13 @@ expression based `matches` operator.
"'5.0067' matches '\^-?\\d+(\\.\\d{2})?$'").getValue(Boolean.class);
----
[NOTE]
====
Be careful with primitive types as they are immediately boxed up to the wrapper type,
so `1 instanceof T(int)` evaluates to `false` while `1 instanceof T(Integer.class)`
evaluates to `true`, as expected.
====
Each symbolic operator can also be specified as a purely alphabetic equivalent. This
avoids problems where the symbols used have special meaning for the document type in
which the expression is embedded (eg. an XML document). The textual equivalents are