Re: [jexl] Make jexl consider power operator

2020-10-27 Thread Henri Biestro
In Java, the following does the trick: // Extend Arithmetic public static class ExtendedJexlArithmetic extends JexlArithmetic { public ExtendedJexlArithmetic(boolean strict){ super(strict); } public double xor(Number l, Number r){ return Math

Re: [jexl] Make jexl consider power operator

2020-10-28 Thread Henri Biestro
Sorry, I misread your original problem; JEXL does follow Java's operator precedence and there is no way to alter this behaviour (besides modifying the grammar in Parser.jjt file). On 2020/09/23 14:28:33, BENGUIGUI Michael wrote: > Dear all, > > I am trying to evaluate the following expressio

Re: [JEXL] Troubles upgrading to 3.2

2021-06-07 Thread Henri Biestro
Hi Francesco; I'm sorry, I've tried and failed setting up a dev env for syncope to debug your pb (java8 vs java11...). I don't see any obvious reason for templates to misbehave. Not sure how to help. I'll keep digging... On 2021/06/07 15:42:55, Francesco Chicchiricc�� wrote: > Hi there, > at Sy

Re: [JEXL] Troubles upgrading to 3.2

2021-06-08 Thread Henri Biestro
Hi Francesco; I was able to reproduce your problem and found the source of the regression that I logged as JEXL-351. The culprit is an unfortunate implementation change in 3.2 that break templates used with strict sandboxing. On your side, if you want to go further with JEXL 3.2, you may want to

Re: jexl upgrade path from 1.x

2023-02-14 Thread Henri Biestro
No, there is no such documentation but if you face difficulties, we'll gladly help. Found a trace of JEXL combat here: https://apache.googlesource.com/commons-jexl/+/refs/heads/2.0-API-COMPAT/jexl2-compat/src/main/java/org/apache/commons/jexl Time flies though, JEXL 3.3 is coming soon, JEXL3 wa

Re: Jexl Expression Documentation

2023-02-16 Thread Henri Biestro
Hi Vipul; I agree the documentation is at best scarce on the matter. The Javadoc for JexlExpression describe them as 'simply a reference to a single expression, not to multiple statements' and ''if','for','while','var' and blocks '{'... '}'are not allowed'. So an expression is composed of identif

Re: [ JEXL ] Engine and expression thread safety

2023-03-01 Thread Henri Biestro
Hi Nilesh; Wrt thread safety, yes, JexlEngine and JexlExpression are thread-safe. Objects whose access is shared through scripts - your classes - must be too though. Btw, in your case, note that JEXL uses a (configurable thread-safe) cache for expressions which may mitigate your need for 'greed

[ANNOUNCEMENT] Apache Commons JEXL 3.3

2023-03-27 Thread Henri Biestro
/proper/commons-jexl/ Changes: https://commons.apache.org/proper/commons-jexl/changes-report.html Download it from: https://commons.apache.org/proper/commons-jexl/download_jexl.cgi Henri Biestro, for the Apache Commons JEXL team

Re: JEXL: all object variables return null

2023-11-08 Thread Henri Biestro
Hi Rinke; >From the looks of it, I'd say the 'private static ' and permissions are >the most likely culprit (if you are using JEXL 3.3). JEXL will only see/introspect public classes for which it is allowed to through permissions; you own classes/packages must be allowed (they aren't by defaul

Re: [jexl] Problem with division of integer values and narrowing of BigDecimal to Integer

2023-11-08 Thread Henri Biestro
Hi Robert; There is no configuration that can help but you can certainly customize and create your own derivation of JexlArithmetic that would forego trying to narrow results for the common arithmetic operators. In your case, it might be enough to just override narrowBigInteger(...bigi) to retur

Re: [jexl] Problem with division of integer values and narrowing of BigDecimal to Integer

2023-11-28 Thread Henri Biestro
Hi Robert; It took me a while to realize it but this behavior is indeed a bug; if user input is a BigDecimal, JEXL should not try and coerce with precision loss. Created JEXL-417. Sorry about the delay. Cheers Henri - To unsubsc

Re: commons-jexl3 issues while calling functions

2024-04-23 Thread Henri Biestro
Hello; In a word, JexlPermissions is the missing piece ( https://commons.apache.org/proper/commons-jexl/apidocs/org/apache/commons/jexl3/introspection/JexlPermissions.html ). At the beginning of the [release notes|https://commons.apache.org/proper/commons-jexl/relnotes33.html], you'll find the

Re: New release for commons jexl

2024-05-24 Thread Henri Biestro
Starting preparations for a 3.4 release :-) Henrib - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org

[ANNOUNCE] Apache Commons JEXL 2.0.1 released

2010-04-07 Thread Henri Biestro
iling Lists" and "Issue Tracking" links here: http://commons.apache.org/jexl/project-info.html Henri Biestro - On behalf of the Apache Commons community

[ JEXL ] Getting ready to release 3.3

2023-02-14 Thread Henri Biestro (Apache)
Dear all; I intend on starting the release of JEXL 3.3 with a landing (ideally) in early March.. If you've any feedback on features, bugs, etc, that may impact that release, please reach out now. Cheers