tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anup Aggarwal <codeteste...@gmail.com>
Subject Lambda expression question on Tomcat_8_0_15
Date Mon, 15 Dec 2014 20:19:48 GMT
Hi,

I am new to learn the LambdaExpression , and I am trying to run a test with
JDK7 on Tomcat_8_0_15 server

protected void doGet... {
             ELProcessor elp = new ELProcessor();
            sos.println("Test: " + (LambdaExpression) elp.eval("()->64"));
}

But I always get this error

java.lang.ClassCastException: java.lang.Long incompatible with
javax.el.LambdaExpression



I have also tried passing an empty array in the invoke() per the API

Object[] empty_array = {};
sos.println("Test: " + ((LambdaExpression)
elp.eval("()->64")).invoke(empty_array));

Same Exception,
java.lang.ClassCastException: java.lang.Long incompatible with
javax.el.LambdaExpression


Can someone help and tell me what I am doing wrong.


Thanks,

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message