Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
3.0
-
None
Description
Sorry for not providing a test case but this is a rare problem I haven't managed to catch. I have a class which implements a Map interface and I have an overloaded JexlArithmetic.empty() and JexlArithmetic.size() methods for this class, and these methods are not related to correspondent Map.isEmpty() and Map.size() methods, they provide separate semantics in my case. Apart from the point that this design is questionable, most of the time everything works as expected in jexl, i.e. when
empty(x)
or
size(x)
operators are used in scripting, the overloaded JexlArithmetic.empty() and JexlArithmetic.size() are called. But sometimes in rare circumstances these operators are not called and Map.isEmpty() and Map.size() methods respectively are called instead. I suspect this has something to do with operators caching, may be you'll be able to check the code?