public class MvelHelperTest
extends junit.framework.TestCase
| Constructor and Description |
|---|
MvelHelperTest() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
executeExternalJavaProcess(Class<?> mainClass) |
void |
testBlankRule()
Test that a blank rule is true.
|
void |
testMvelMethodOverloadFailureCase()
Confirms MVEL failure for special overloaded method case.
|
void |
testMvelMethodOverloadWorkaroundCase()
Confirms repeated success for method overload workaround in SelectizeCollectionUtils
|
void |
testNullRule()
Test that a null rule is true.
|
void |
testRequestMapProperty()
Tests MVEL syntax for accessing request property map values.
|
void |
testRuleThatEvaluatesToFalse()
Test rule that evaluates to true
|
void |
testRuleThatEvaluatesToTrue()
Test rule that evaluates to true
|
void |
testRuleWithParseErrors()
Test rule with parse errors
|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toStringpublic void testBlankRule()
public void testNullRule()
public void testRuleWithParseErrors()
public void testRuleThatEvaluatesToTrue()
public void testRuleThatEvaluatesToFalse()
public void testRequestMapProperty()
public void testMvelMethodOverloadFailureCase()
throws IOException
SelectizeCollectionUtils#intersection(String param, Iterable param2);
SelectizeCollectionUtils#intersection(Iterable param, Iterable param2);
If a rule is executed calling the intersection method and a null is passed in for the first parameter, mvel will
not know which method to pick, so it will end up picking one of them. This has proven to be undetermined at runtime,
which has made the problem even harder to identify. Furthermore, once the choice is made during compilation,
that compiled expression will utilize the "incorrect" choice going forward, which will cause the expression to
fail, even when neither param is null. In fact, in the case above, mvel will "coerce" the first param Iterable
instance into a String (i.e. flatten the list representation into a comma delimited String) in order to continue
calling the method identified during compilation. This causes the expression to permanently be in an incorrect
state from which it will never recover.IOExceptionpublic void testMvelMethodOverloadWorkaroundCase()
throws IOException
testMvelMethodOverloadFailureCase() for a more complete description of the problem case.IOExceptionprotected String executeExternalJavaProcess(Class<?> mainClass) throws IOException
IOExceptionCopyright © 2017. All rights reserved.