Commit Graph

312 Commits

Author SHA1 Message Date
Juergen Hoeller
5ca2c56cf0 Polishing 2018-09-17 14:39:54 +02:00
Juergen Hoeller
06ed818f4c Fix SpEL compilation for non trivial elvis operand
Issue: SPR-17214
2018-09-07 13:12:53 +02:00
Juergen Hoeller
04814e604e Polishing
(cherry picked from commit 95a56cd28d)
2018-08-31 12:57:31 +02:00
Juergen Hoeller
e332e32a88 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 12:57:23 +02:00
Juergen Hoeller
0c5c3103c6 ReflectiveMethodExecutor skips interface search (plus related polishing) 2018-07-19 16:51:13 +02:00
Juergen Hoeller
11fc086309 Prefer ArrayList/ArrayDeque over LinkedList for multi-element holders
LinkedList remains in place where a List is likely to remain empty or single-element (in order to avoid unused capacity).

Issue: SPR-17037

(cherry picked from commit 9c08a48)
2018-07-19 00:08:13 +02:00
Juergen Hoeller
214fa9c2a0 Polishing 2018-06-29 22:43:13 +02:00
Juergen Hoeller
a631af80c1 Polishing
(cherry picked from commit 40efcc9)
2018-06-28 16:42:14 +02:00
Juergen Hoeller
78d3164543 Remove outdated javadoc references to SpEL lambda functions
Issue: SPR-16930

(cherry picked from commit 6df7ba2)
2018-06-11 18:08:20 +02:00
Juergen Hoeller
da049f480b ReflectivePropertyAccessor caches sorted methods per class
Issue: SPR-16882
2018-06-11 14:59:08 +02:00
Juergen Hoeller
8848ec73ab Refined backport of gh-1817 2018-05-05 13:18:08 +02:00
Juergen Hoeller
30363c84bd Consistent SpelEvaluationException messages in findAccessorForMethod
Issue: SPR-16762
2018-05-02 16:53:55 +02:00
Juergen Hoeller
9d37c099a8 OperatorMatches flags misguided evaluation attempts as FLAWED_PATTERN
Issue: SPR-16731

(cherry picked from commit d4a55a2)
2018-04-17 13:35:01 +02:00
Juergen Hoeller
d553ddc5b3 Nullability refinements (based on IntelliJ IDEA 2018.1 introspection)
Issue: SPR-15756
2018-03-29 23:50:17 +02:00
igor-suhorukov
93abe0e94b All branches in a conditional structure should not have exactly the same implementation 2018-03-29 23:33:50 +02:00
Juergen Hoeller
08dad4e3ac Consistent references to primitive types (in alphabetical order) 2018-03-29 16:05:00 +02:00
igor-suhorukov
8d2f64fe2d Nested "enum"s should not be declared static
Closes gh-1759
2018-03-29 09:12:03 +02:00
Juergen Hoeller
b2d87abcbb Polishing 2018-03-28 12:06:38 +02:00
Juergen Hoeller
c072c6deb5 Refined javadoc for SimpleEvaluationContext and its builder features
Issue: SPR-16588
2018-03-27 17:07:03 +02:00
Juergen Hoeller
c60cefa331 SimpleEvaluationContext.Builder withRootObject/withTypedRootObject
Issue: SPR-16588
2018-03-27 00:22:54 +02:00
Juergen Hoeller
9128226da4 SimpleEvaluationContext.Builder withMethodResolvers/withInstanceMethods
Includes DataBindingMethodResolver as ReflectiveMethodResolver subclass.

Issue: SPR-16588
2018-03-24 16:30:37 +01:00
Juergen Hoeller
38dcd179d5 Guidance of which PropertyAccessors to use with SimpleEvaluationContext
Issue: SPR-16588
2018-03-23 17:29:21 +01:00
Juergen Hoeller
51c57d77d9 SimpleEvaluationContext with dedicated factory methods for common cases
Aligned with DataBindingPropertyAccessor and shown in ref doc examples.

Issue: SPR-16588
2018-03-22 18:09:27 +01:00
Rossen Stoyanchev
19293b9847 SimpleEvaluationContext builder
Issue: SPR-16588
2018-03-21 22:36:08 -04:00
Juergen Hoeller
b5511645b8 DataBindingPropertyAccessor with factory methods (forReadOnlyAccess etc)
Includes configurable write support at ReflectivePropertyAccessor level.

Issue: SPR-16588
2018-03-22 00:03:06 +01:00
Juergen Hoeller
c1405ef140 Polishing 2018-03-21 16:12:42 +01:00
Juergen Hoeller
639d2c6fe7 Polishing 2018-03-21 12:39:15 +01:00
Juergen Hoeller
1fd5935afa SimplePropertyAccessor with configurable write support
Issue: SPR-16588
2018-03-21 12:06:40 +01:00
Rossen Stoyanchev
cb8c6e3251 Add SimpleEvaluationContext
Issue: SPR-16588
2018-03-14 15:53:19 -04:00
Juergen Hoeller
3988dd9ebb Polishing 2018-03-14 17:24:58 +01:00
Andy Clement
1db7e02de3 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-03-12 15:58:59 -07:00
Juergen Hoeller
04a8f81710 Polishing 2018-03-12 20:42:03 +01:00
Juergen Hoeller
139dc1d373 Polishing (collapsed if checks, consistent downcasts, refined javadoc) 2018-03-08 18:11:57 +01:00
igor-suhorukov
0f7485b01d Polish: reorder the modifiers to comply with the Java Language Specification. 2018-03-08 17:57:47 +01:00
Juergen Hoeller
c543368aad Polishing 2018-03-03 17:33:48 +01:00
igor-suhorukov
06fef1e5a4 Polish: assertion arguments should be passed in the correct order 2018-03-03 16:14:45 +01:00
Juergen Hoeller
fa670dd07d Indexer enforces target descriptor only after non-null target check
Issue: SPR-16544
2018-03-01 13:31:56 +01:00
igor-suhorukov
c782075a13 Polish: Array designators "[]" should be on the type, not the variable 2018-02-25 13:14:20 +01:00
Juergen Hoeller
3531c104b0 Prefer Collections.addAll call with array over Set.addAll(Arrays.asList) 2018-02-25 00:21:39 +01:00
Juergen Hoeller
a5cbf5fe24 Consistent use of Collection.toArray with zero-sized array argument
Includes consistent use of ClassUtils.toClassArray (as non-null variant)

Issue: SPR-16523
2018-02-22 11:29:46 +01:00
Juergen Hoeller
3b810f3544 Consistent Class array vs vararg declarations (and related polishing) 2018-02-14 14:44:00 +01:00
igor-suhorukov
45e520ed86 Polish: remove unused private fields, remove empty operator 2018-02-13 23:00:18 +01:00
Juergen Hoeller
d5cabca2f7 Internal adaptation to Deque semantics 2018-02-12 15:55:09 +01:00
igor-suhorukov
711b0f50f2 Polish: replace the synchronized class "Stack" by an unsynchronized one such as "Deque". 2018-02-11 21:15:46 +01:00
Juergen Hoeller
b5bd977d9a Revised assertion refactoring in AbstractExpressionTests 2018-02-10 18:17:40 +01:00
igor-suhorukov
0ee505b73e Polish: assertion arguments should be passed in the correct order,
use assertNull instead of assertEquals(null, value),
declare delta as double value in assertEquals
2018-02-10 17:17:28 +01:00
igor-suhorukov
9a6fbf59c5 Polish: follow name convention - make immutable fields final 2018-02-10 12:09:19 +01:00
igor-suhorukov
4c888d0f32 Polish
Closes gh-1669
2018-02-09 10:10:05 +01:00
Juergen Hoeller
572c668726 Polishing 2018-01-19 21:30:37 +01:00
Juergen Hoeller
06e6386dc9 CollectionUtils.lastElement for common Set/List extraction
Issue: SPR-16374
2018-01-12 18:23:52 +01:00