Created
February 17, 2021 12:22
-
-
Save artem-smotrakov/5c8709fd6abe7f1a76be9d82fc838200 to your computer and use it in GitHub Desktop.
Run JEXL expressions in a sandbox implemented with JexlSandbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JexlSandbox sandbox = new JexlSandbox(false); | |
sandbox.white("com.safe.Functions"); | |
JexlEngine jexl = new JexlBuilder().sandbox(sandbox).create(); | |
JexlExpression expression = jexl.createExpression(str); | |
JexlContext context = new MapContext(); | |
expression.evaluate(context); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment