How to use or escape java 8 Lambda expressions in Beanshell

限于喜欢 提交于 2019-12-19 09:50:10

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/53849019/how-to-use-or-escape-java-8-lambda-expressions-in-beanshell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!