|
64 | 64 | public class SpelCompilationCoverageTests extends AbstractExpressionTests {
|
65 | 65 |
|
66 | 66 | /*
|
67 |
| - * Further TODOs for compilation: |
| 67 | + * TODO Potential optimizations for SpEL compilation: |
68 | 68 | *
|
69 | 69 | * - OpMinus with a single literal operand could be treated as a negative literal. Will save a
|
70 | 70 | * pointless loading of 0 and then a subtract instruction in code gen.
|
@@ -1205,12 +1205,12 @@ void functionReferenceVarargs_SPR12359() throws Exception {
|
1205 | 1205 | assertCanCompile(expression);
|
1206 | 1206 | assertThat(expression.getValue(context, new SomeCompareMethod2()).toString()).isEqualTo("xyz");
|
1207 | 1207 |
|
1208 |
| - // TODO fails due to conversionservice handling of String[] to Object... |
1209 |
| - // expression = parser.parseExpression("#append2(#stringArray)"); |
1210 |
| - // assertEquals("xyz", expression.getValue(context).toString()); |
1211 |
| - // assertTrue(((SpelNodeImpl)((SpelExpression) expression).getAST()).isCompilable()); |
1212 |
| - // assertCanCompile(expression); |
1213 |
| - // assertEquals("xyz", expression.getValue(context).toString()); |
| 1208 | + // TODO Determine why the String[] is passed as the first element of the Object... varargs array instead of the entire varargs array. |
| 1209 | + // expression = parser.parseExpression("#append2(#stringArray)"); |
| 1210 | + // assertThat(expression.getValue(context)).hasToString("xyz"); |
| 1211 | + // assertThat(((SpelNodeImpl) ((SpelExpression) expression).getAST()).isCompilable()).isTrue(); |
| 1212 | + // assertCanCompile(expression); |
| 1213 | + // assertThat(expression.getValue(context)).hasToString("xyz"); |
1214 | 1214 |
|
1215 | 1215 | expression = parser.parseExpression("#sum(1,2,3)");
|
1216 | 1216 | assertThat(expression.getValue(context)).isEqualTo(6);
|
@@ -3703,16 +3703,16 @@ void methodReferenceVarargs() {
|
3703 | 3703 | assertThat(tc.s).isEqualTo("aaabbbccc");
|
3704 | 3704 | tc.reset();
|
3705 | 3705 |
|
3706 |
| - // TODO Fails related to conversion service converting a String[] to satisfy Object... |
3707 |
| -// expression = parser.parseExpression("sixteen(stringArray)"); |
3708 |
| -// assertCantCompile(expression); |
3709 |
| -// expression.getValue(tc); |
3710 |
| -// assertEquals("aaabbbccc", tc.s); |
3711 |
| -// assertCanCompile(expression); |
3712 |
| -// tc.reset(); |
3713 |
| -// expression.getValue(tc); |
3714 |
| -// assertEquals("aaabbbccc", tc.s); |
3715 |
| -// tc.reset(); |
| 3706 | + // TODO Determine why the String[] is passed as the first element of the Object... varargs array instead of the entire varargs array. |
| 3707 | + // expression = parser.parseExpression("sixteen(stringArray)"); |
| 3708 | + // assertCantCompile(expression); |
| 3709 | + // expression.getValue(tc); |
| 3710 | + // assertThat(tc.s).isEqualTo("aaabbbccc"); |
| 3711 | + // assertCanCompile(expression); |
| 3712 | + // tc.reset(); |
| 3713 | + // expression.getValue(tc); |
| 3714 | + // assertThat(tc.s).isEqualTo("aaabbbccc"); |
| 3715 | + // tc.reset(); |
3716 | 3716 |
|
3717 | 3717 | // varargs int
|
3718 | 3718 | expression = parser.parseExpression("twelve(1,2,3)");
|
|
0 commit comments