How to use or escape java 8 Lambda expressions in Beanshell

Madhu K :

I'm working on a Product (Sailpoint IdentityIQ that runs in Tomcat) which uses Beanshell env for product customization hooks. I want to write some code to parse a large csv file and want to leverage Java 8 Streams. But I'm facing issue with Beanshell env throwing errors and didn't recognize the Lambda expressions though we are using Java 8

Is there any way we can tell beanshell to recognize the lambdas or escape in the code

user7294900 :

Lambda expressions still not supported in beanshell

Lambdas are coming, rest assured! With the new approach of using Method Handles we are one step closer to utilise Lambda Meta Factory for creating function objects, unless we don't simply go the same route as with Java EL... we have options.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=97997&siteId=1