The argument processing for compiling constructor references
was very basic and this fix removes that and ensures the
comprehensive logic written for method argument processing
(under SPR-12328) is now used for both method and constructor
argument handling. This fixes the reported issue and ensures
varargs constructor references can be compiled.
This also includes a couple of small fixes for the secondary
testcase reported in SPR-12326. The first is to ensure the
right root context object is used when it is passed
to getValue() indirectly through the evaluation context.
The final fix is to ensure correct boxing of primitives is
done when a method is called upon a primitive.
Issue: SPR-12326
@ -437,29 +437,21 @@ public class ConstructorReference extends SpelNodeImpl {
@@ -437,29 +437,21 @@ public class ConstructorReference extends SpelNodeImpl {
@ -1683,6 +1684,128 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
@@ -1683,6 +1684,128 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
@ -3440,6 +3563,66 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
@@ -3440,6 +3563,66 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
@ -156,7 +156,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests {
@@ -156,7 +156,7 @@ public class SpelCompilationPerformanceTests extends AbstractExpressionTests {
Objecto=expression.getValue(g);
assertEquals("helloworld spring",o);
System.out.println("Performance check for SpEL expression: '{'abcde','ijklm'}[0].substring({1,3,4}[0],{1,3,4}[1])'");