Evaluating MVEL expressions - ClassCastException
<p>I am trying to evaluate an expression using Mvel java library. The expression is to check if a list contains a given string, but I am getting ClassCastException when ececuting the program. Below is the code snippet. </p>

<p>Any help is appreciated, Thanks!</p>

<pre><code>import org.mvel2.MVEL;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by rakesh on 25-Nov-16.
 */
public class Test {
    public static void main(String[] args) {
        Map&lt;String, Object&gt; evalParams = new HashMap&lt;&gt;();
        List&lt;String&gt; list = Arrays.asList("abc", "xyz", "asd");
        evalParams.put("subType",list);
//        evalParams.put("contentType","Hotfixes");
        System.out.println();
//        System.out.println(MVEL.evalToBoolean("contentType == \"Hotfixes\" &amp;&amp; \"abc\" in subType", evalParams));
        System.out.println(MVEL.evalToBoolean("\"abc\" in subType", evalParams));
    }
}
</code></pre>

<p><strong>Maven dependency details:</strong></p>

<pre><code>&lt;dependency&gt;
    &lt;groupId&gt;org.mvel&lt;/groupId&gt;
    &lt;artifactId&gt;mvel2&lt;/artifactId&gt;
    &lt;version&gt;2.3.1.Final&lt;/version&gt;
&lt;/dependency&gt;
</code></pre>

<p><strong>Stacktrace:</strong></p>

<pre><code>Exception in thread "main" [Error: syntax error or incompatable types]
[Near : {... "abc" in subType ....}]
                      ^
[Line: 1, Column: 10]
    at org.mvel2.compiler.AbstractParser.reduce(AbstractParser.java:2617)
    at org.mvel2.compiler.AbstractParser.arithmeticFunctionReduction(AbstractParser.java:2522)
    at org.mvel2.MVELInterpretedRuntime.parseAndExecuteInterpreted(MVELInterpretedRuntime.java:147)
    at org.mvel2.MVELInterpretedRuntime.parse(MVELInterpretedRuntime.java:47)
    at org.mvel2.MVEL.eval(MVEL.java:288)
    at org.mvel2.MVEL.evalToBoolean(MVEL.java:612)
    at org.mvel2.MVEL.evalToBoolean(MVEL.java:657)
    at Test.main(Test.java:19)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long
    at org.mvel2.compiler.AbstractParser.reduceNumeric(AbstractParser.java:2643)
    at org.mvel2.compiler.AbstractParser.reduce(AbstractParser.java:2613)
    ... 12 more
</code></pre>