Commit Graph

251 Commits

Author SHA1 Message Date
Juergen Hoeller
ec1aa5c6ea Polishing 2018-09-17 14:56:55 +02:00
Juergen Hoeller
6a5d986b33 Fix SpEL compilation for non trivial elvis operand
Issue: SPR-17214
2018-09-07 13:19:47 +02:00
Juergen Hoeller
8ce9236b0f Polishing
(cherry picked from commit 95a56cd28d)
2018-08-31 13:22:55 +02:00
Juergen Hoeller
1a626ab948 SpelExpression consistently exposes EvaluationContext to compiled AST
Operator includes explicit support for Boolean comparisons now.

Issue: SPR-17229

(cherry picked from commit 51cee658d5)
2018-08-31 13:22:14 +02:00
Juergen Hoeller
740751bc01 Polishing 2018-06-29 23:05:40 +02:00
Juergen Hoeller
fa8acfafbf Polishing 2018-06-29 21:21:19 +02:00
Juergen Hoeller
6df7ba2447 Remove outdated javadoc references to SpEL lambda functions
Issue: SPR-16930
2018-06-11 16:55:52 +02:00
Juergen Hoeller
4a6e9a5557 ReflectivePropertyAccessor caches sorted methods per class
Issue: SPR-16882
2018-06-11 16:47:52 +02:00
Juergen Hoeller
c99a104919 Polishing 2018-05-05 16:36:52 +02:00
Juergen Hoeller
e4a9ade991 Consistent SpelEvaluationException messages in findAccessorForMethod
Issue: SPR-16762

(cherry picked from commit 30363c8)
2018-05-02 17:21:07 +02:00
Juergen Hoeller
6a727e1ed7 OperatorMatches flags misguided evaluation attempts as FLAWED_PATTERN
Issue: SPR-16731

(cherry picked from commit d4a55a2)
2018-04-17 13:46:37 +02:00
Andy Clement
d3acf45ea4 Modify SpEL code gen to take account of null safe refs
With this change the code generation for method and property
references is modified to include branching logic in the
case of null safe dereferencing (?.). This is complicated
by the possible usage of primitives on the left hand side
of the dereference. To cope with this case primitives are
promoted to boxed types when this situation occurs enabling
null to be passed as a possible result.

Issue: SPR-16489
2018-04-05 14:36:36 -07:00
Juergen Hoeller
b0ed385f84 Polishing 2018-03-31 17:06:33 +02:00
Juergen Hoeller
bcda243f63 Polishing 2018-03-29 17:34:28 +02:00
Juergen Hoeller
64f304c333 Consistent references to primitive types (in alphabetical order)
(cherry picked from commit 08dad4e)
2018-03-29 17:33:13 +02:00
Juergen Hoeller
f32b13c5b3 Restored original 4.3.x expectation for property access on null target 2018-03-28 11:40:24 +02:00
Juergen Hoeller
9cc03fa8b0 Polishing 2018-03-28 02:03:31 +02:00
Juergen Hoeller
65a8aa1c09 Backported DataBindingPropertyAccessor and DataBindingMethodResolver
Issue: SPR-16588
2018-03-28 01:22:59 +02:00
Rossen Stoyanchev
4bc3e0c2b4 Add SimpleEvaluationContext
Issue: SPR-16588
2018-03-14 16:10:28 -04:00
Juergen Hoeller
bc043245cc Polishing 2018-03-03 17:18:44 +01:00
Juergen Hoeller
1f12214b45 Polishing 2018-03-02 13:11:31 +01:00
igor-suhorukov
d5f358c33c Polish: Array designators "[]" should be on the type, not the variable
(cherry picked from commit c782075)
2018-02-25 15:03:54 +01:00
Juergen Hoeller
722cb36e01 Consistent Class array vs vararg declarations (and related polishing)
(cherry picked from commit 3b810f3)
2018-02-14 16:38:28 +01:00
Juergen Hoeller
afe461609c Polishing (selective backports from master) 2018-02-12 13:45:53 +01:00
Juergen Hoeller
8b5a013423 Polishing 2018-01-19 19:35:02 +01:00
Juergen Hoeller
a9bad580d9 FunctionReference's method field is volatile
Issue: SPR-16255

(cherry picked from commit 6a1fe0b)
2018-01-19 18:38:13 +01:00
Juergen Hoeller
6dc73469f9 MethodReference treats proxy-targeting expressions as non-compilable
Issue: SPR-16191

(cherry picked from commit c30145d)
2017-11-14 12:28:15 +01:00
Juergen Hoeller
9cc3349e2d Introspect interface-declared methods in case of proxy (for varargs)
Issue: SPR-16122

(cherry picked from commit 419b444)
2017-10-27 11:30:52 +02:00
Juergen Hoeller
be5b9354a9 Polishing 2017-10-24 14:34:56 +02:00
Juergen Hoeller
d0d4421aea Tokenizer uses single process step and length-based exhaustion check
Issue: SPR-16032

(cherry picked from commit 03b6828)
2017-10-04 13:18:04 +02:00
Juergen Hoeller
5f167fd7f8 Polishing 2017-09-27 01:46:16 +02:00
Juergen Hoeller
9fdc4404a5 Backport selected refinements from the nullability efforts
Issue: SPR-15656
2017-09-27 00:10:04 +02:00
Juergen Hoeller
c752ba5b38 Polishing 2017-07-19 23:55:47 +02:00
Juergen Hoeller
4b2bad96ce Polishing
(cherry picked from commit efc5b47)
2017-07-14 17:41:26 +02:00
Juergen Hoeller
1513c4a952 Expression javadoc alignment
(cherry picked from commit 1ad6180)
2017-07-14 17:12:50 +02:00
Juergen Hoeller
bb6d9fabee Expression alignment and related polishing (backported from master) 2017-07-14 15:41:38 +02:00
Juergen Hoeller
bffcd33ea3 PropertyOrFieldReference checks cached PropertyAccessor against current EvaluationContext
Issue: SPR-15769
(cherry picked from commit bcf9f21)
2017-07-14 15:40:52 +02:00
stonio
1db42081e5 Use String#isEmpty()
Closes gh-1335
(cherry picked from commit 7d062df)
2017-02-22 16:31:35 +01:00
Andy Clement
7879bdfc1d Fix compilation of SpEL elvis/ternary expressions
Without this fix the compiled version of elvis
actual behaved differently to the interpreted version
if the value being queried was an empty string. This
is now fixed. It also now correctly handles the
query value being a primitive and addresses the
findings of SPR-15192 where some type inferencing
logic was trying to be too clever, that code has
been deleted.

Issue: SPR-15192
(cherry picked from commit d41d28f)
2017-02-18 00:50:30 +01:00
Juergen Hoeller
5f90a7eee9 Delegate to common ClassUtils.getQualifiedName
Issue: SPR-15237
(cherry picked from commit 81aca78)
2017-02-10 11:47:00 +01:00
Juergen Hoeller
8207c53b9a Polishing 2017-01-31 11:36:52 +01:00
Juergen Hoeller
28849e0987 Revisit Assert to avoid single-arg assert methods (with refined messages)
Issue: SPR-15196
(cherry picked from commit 1b2dc36)
2017-01-31 10:28:46 +01:00
Juergen Hoeller
0028b29760 Polishing 2016-12-01 19:09:26 +01:00
Juergen Hoeller
a7ba63d425 Shared DefaultConversionService instance for simple fallback purposes
Issue: SPR-14948
(cherry picked from commit 80931b2)
2016-12-01 14:10:39 +01:00
Juergen Hoeller
5ca10b1d67 Consistent ExpressionException-style quoting of expression string and position
Issue: SPR-14942
(cherry picked from commit 14eba50)
2016-12-01 14:10:23 +01:00
Andy Clement
38cd1ecff4 Rework compilation of OpNE/OpEQ SpEL operators
For SPR-14863 we need to adjust the code generation for OpNE
to use !x.equals(y) rather than x!=y. There are also further
cases in the equalityCheck() code in Operator that were not
being handled in the compilation case (when comparators are
used for example). This latter issue also affects OpEQ.

Rather than add yet more bytecode generation, both OpNE and
OpEQ generateCode() methods have been simplified. The
generated code now delegates to equalityCheck() in Operator
which is exactly what the interpreted case does.

This ensures that the compiled code continues to behave just
like the interpreted case. It ensures changes to the interpreted
case are automatically picked up for the compiled case. It
makes the bytecode generation simpler.

The benefit of compilation of SpEL expressions is to avoid
slow reflective calls - that doesn't apply for a basic
(in)equality test so there is no need to go crazy in bytecode
gen.

Issue: SPR-14863
(cherry picked from commit 9000acd)
2016-11-02 12:40:24 +01:00
Juergen Hoeller
ade139f2d0 Polishing
(cherry picked from commit 45fc449)
2016-10-31 19:29:04 +01:00
Juergen Hoeller
bf0df54136 Consistent instanceof/casting of Class references
(cherry picked from commit ac80ac6)
2016-10-31 11:50:59 +01:00
Juergen Hoeller
5697cb6c95 AccessorLValue reliably downcasts to CompilablePropertyAccessor in concurrent scenarios
Issue: SPR-14850
(cherry picked from commit e2b1dcb)
2016-10-31 11:44:08 +01:00
Juergen Hoeller
9de28d640e Polishing
(cherry picked from commit 3726c6f)
2016-10-21 12:59:59 +02:00