Juergen Hoeller
59a9c8e004
MethodReference.MethodValueRef.setValue throws SpelEvaluationException
...
Closes gh-22336
2019-02-05 00:43:56 +01:00
Juergen Hoeller
a27a6470f7
Polishing
2019-02-05 00:10:22 +01:00
stsypanov
248d3f8e8b
Use AtomicInteger instead of unsafe increment on volatile fields
2019-02-04 23:22:20 +01:00
Juergen Hoeller
7a77e83e10
SpelNodeImpl manages start/end position in separate integer values
...
Fixes gh-22157
2019-01-28 22:50:56 +01:00
Rossen Stoyanchev
bdac937a43
Replace more references to issue tracker
...
Fixes #22254
2019-01-17 17:08:39 -05:00
Juergen Hoeller
b2756f5bd2
Relaxed position assertion (for overflows in large inline maps)
...
Issue: SPR-17605
2018-12-25 13:22:00 +01:00
Stephane Nicoll
9cbd585c30
Polish "Join identical catch branches"
...
Closes gh-2052
2018-12-25 09:46:35 +01:00
igor-suhorukov
a218bf40cd
Join identical catch branches
...
See gh-2052
2018-12-25 09:46:11 +01:00
Rossen Stoyanchev
38ae282c3b
Update log category precision for all tests
...
Replace the full category capped at 36 chars with the class name only
and 1 char per package, e.g. org.apache.commons.Foo -> o.a.c.Foo
2018-12-12 11:40:33 -05:00
Juergen Hoeller
db63f7dd4a
StandardEvaluationContext.setVariable leniently ignores null name
...
Issue: SPR-17565
2018-12-05 14:13:24 +01:00
Hanope
bfb49c7249
Fix typos
...
See gh-2019
2018-11-19 08:41:21 +01:00
Juergen Hoeller
59fa647e2d
StandardEvaluationContext supports concurrent variable modification
...
Issue: SPR-17448
2018-11-05 12:26:35 +01:00
Juergen Hoeller
34663300a6
Avoid regex pattern matching for simple String replacement steps
...
Issue: SPR-17279
2018-09-17 14:22:19 +02:00
Juergen Hoeller
3abebb3799
Polishing
2018-09-07 13:23:22 +02:00
Juergen Hoeller
90a4740279
Polishing
2018-09-07 12:56:53 +02:00
Andy Clement
f87a37fd0d
Fix SpEL compilation for non trivial elvis operand
...
Issue: SPR-17214
2018-09-05 09:41:13 -07:00
Juergen Hoeller
95a56cd28d
Polishing
2018-08-31 12:41:40 +02:00
Juergen Hoeller
51cee658d5
SpelExpression consistently exposes EvaluationContext to compiled AST
...
Operator includes explicit support for Boolean comparisons now.
Issue: SPR-17229
2018-08-31 12:41:22 +02:00
stsypanov
457d586859
SPR-17074 pass argument of addAll/putAll into constructor
2018-07-30 21:27:55 +02:00
Juergen Hoeller
c4df335a1d
ReflectiveMethodExecutor invokes interface method if possible
...
Issue: SPR-16845
2018-07-19 16:35:59 +02:00
Juergen Hoeller
9c08a482d1
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
2018-07-18 22:17:42 +02:00
Juergen Hoeller
641039d85d
Polishing
2018-06-29 22:36:08 +02:00
Juergen Hoeller
8ad5299f4a
Polishing
2018-06-28 17:12:29 +02:00
Phillip Webb
a89e716cc7
Use tabs rather than spaces in tests
...
Update tests to ensure that tabs are used instead of spaces. Also
consistently apply a new line at the end of each file.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
1c25cec44f
Polish test code
...
Polish a few issue identified when adding checkstyle to the
build. Although checkstyle is not enforcing rules on tests,
these are a few minor changes that are still worth making.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
5cedd0d5d4
Consistently use tabs rather than spaces
...
Update code that has accidentally used spaces instead of tabs.
Also remove all trailing whitespace.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
be85bd8e09
Don't use `==` when comparing strings
...
Fix a few places where `==` was accidentally used to compare
strings.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
13729364ab
Consistently use only one statement per line
...
Ensure that only one statement is used per line.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
0b53c1096a
Always use 'this.' when accessing fields
...
Ensure that `this.` is used consistently when accessing class
fields.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
eeebd51f57
Use consistent class design
...
Update all classes so that inner classes are always last. Also
ensure that utility classes are always final and have a private
constructor and make exceptions final whenever possible.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
866e9d702e
Use consistent block style
...
Update all code to use a consistent block style.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
e0480f75ac
Fix javadoc checkstyle issues
...
Fix checkstyle violations for javadoc.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Juergen Hoeller
4aafbe5a84
Remove outdated javadoc references to SpEL lambda functions
...
Issue: SPR-16930
(cherry picked from commit 78d3164
)
2018-06-11 19:16:14 +02:00
Juergen Hoeller
e2ccd55d14
ReflectivePropertyAccessor uses computeIfAbsent for cache computation
...
Issue: SPR-16882
2018-06-10 23:56:32 +02:00
Juergen Hoeller
bfcc1a1f6a
ReflectivePropertyAccessor caches sorted methods per class
...
Issue: SPR-16882
2018-06-06 21:25:53 +02:00
Juergen Hoeller
c9f488363d
Fine-tuned assertions and related polishing
2018-05-05 14:39:43 +02:00
Stéphane GRILLON
c5278aa359
Remove unnecessary boxing
...
Closes gh-1817
2018-05-03 10:48:50 +02:00
Juergen Hoeller
ac1e2a4598
Consistent SpelEvaluationException messages in findAccessorForMethod
...
Includes abstract declarations for FormatHelper and ReflectionHelper.
Issue: SPR-16762
2018-05-01 23:48:26 +02:00
Juergen Hoeller
d4a55a257b
OperatorMatches flags misguided evaluation attempts as FLAWED_PATTERN
...
Issue: SPR-16731
2018-04-17 11:10:15 +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
Juergen Hoeller
4a57e26d76
Polishing
2018-01-07 23:33:35 +01:00
Juergen Hoeller
6a1fe0b1d0
FunctionReference's method field is volatile
...
Issue: SPR-16255
2018-01-07 23:23:45 +01:00
Juergen Hoeller
c30145d6f9
MethodReference treats proxy-targeting expressions as non-compilable
...
Issue: SPR-16191
2017-11-13 23:00:53 +01:00
Juergen Hoeller
78284a62e2
Polishing
2017-10-27 15:28:51 +02:00
Juergen Hoeller
419b4440a7
Introspect interface-declared methods in case of proxy (for varargs)
...
Issue: SPR-16122
2017-10-27 10:52:44 +02:00
Juergen Hoeller
fd6f2bd6a4
Test for null value against boolean property
...
Issue: SPR-16123
2017-10-26 22:49:34 +02:00
Juergen Hoeller
55b0c2f243
Polishing
2017-10-24 01:01:42 +02:00
Juergen Hoeller
03b68286a2
Tokenizer uses single process step and length-based exhaustion check
...
Issue: SPR-16032
2017-10-04 12:23:16 +02:00
Juergen Hoeller
efce7902c4
Polishing
2017-09-27 01:34:11 +02:00
Juergen Hoeller
9190b76ab9
Latest dependency updates (POI 3.17, Rome 1.8, EhCache 3.4, Caffeine 2.5.6, RxJava 2.1.4, Tomcat 8.5.21, JRuby 9.1.13, Rhino 1.7.7.2)
2017-09-23 11:28:19 +02:00
Juergen Hoeller
7ae59d0c2a
Nullability refinements on private and static methods
...
Based on IntelliJ IDEA 2017.3 introspection results.
Issue: SPR-15756
2017-09-22 18:22:14 +02:00
Sebastien Deleuze
1bc93e3d0f
Revisit nullability annotations
...
This commit introduces the following changes.
1) It adds a new Spring @NonNull annotation which allows to apply
@NonNullApi semantic on a specific element, like @Nullable does.
Combined with @Nullable, it allows partial null-safety support when
package granularity is too broad.
2) @Nullable and @NonNull can apply to ElementType.TYPE_USE in order
to be used on generic type arguments (SPR-15942).
3) Annotations does not apply to ElementType.TYPE_PARAMETER anymore
since it is not supported yet (applicability for such use case is
controversial and need to be discussed).
4) @NonNullApi does not apply to ElementType.FIELD anymore since in a
lot of use cases (private, protected) it is not part for the public API
+ its usage should remain opt-in. A dedicated @NonNullFields annotation
has been added in order to set fields default to non-nullable.
5) Updated Javadoc and reference documentation.
Issue: SPR-15756
2017-09-15 13:26:41 +02:00
Juergen Hoeller
04765b6202
Upgrade to OkHttp 3.9 and removal of superfluous spring-jcl reference
2017-09-08 16:56:40 +02:00
Brian Clozel
2eeb428e95
Move modules to independent build files
...
The main `build.gradle` file contains now only the common build
infrastructure; all module-specific build configurations have
been moved to their own build file.
Issue: SPR-15885
2017-08-21 14:41:55 +02:00
Sebastien Deleuze
73cf07e9a4
Fix overridden methods nullability
...
Issue: SPR-15869
2017-08-17 15:02:59 +02:00
Juergen Hoeller
af93503a09
TemplateAwareExpressionParser treats null as non-template ParserContext
...
Issue: SPR-15810
2017-07-25 14:12:41 +02:00
Juergen Hoeller
46eba3dbfa
Nullability fine-tuning around declaration inconsistencies
...
Issue: SPR-15720
Issue: SPR-15792
2017-07-19 22:22:20 +02:00
Juergen Hoeller
12114a9d4c
Consistent use of NIO.2 for file read/write interactions
...
Issue: SPR-15748
2017-07-18 00:54:41 +02:00
Juergen Hoeller
efc5b47b9a
Polishing
2017-07-14 17:37:06 +02:00
Juergen Hoeller
1ad6180019
Expression javadoc alignment
2017-07-14 16:46:22 +02:00
Juergen Hoeller
bcf9f21ecc
PropertyOrFieldReference checks cached PropertyAccessor against current EvaluationContext
...
Issue: SPR-15769
2017-07-14 15:18:05 +02:00
Juergen Hoeller
301e2ea493
Nullability fine-tuning and related polishing
...
Issue: SPR-15720
2017-07-13 21:20:42 +02:00
Juergen Hoeller
cc74a2891a
@Nullable all the way: null-safety at field level
...
This commits extends nullability declarations to the field level, formalizing the interaction between methods and their underlying fields and therefore avoiding any nullability mismatch.
Issue: SPR-15720
2017-06-30 01:54:16 +02:00
Juergen Hoeller
140542e8b1
Polishing
2017-06-26 18:59:17 +02:00