i just wanted to ask, if it is a bug, that within the expression language, the bit operator & is handled after the math operators or if it is supposed to act so:
i = 47 (for example bound to a tag)
if(i&64>0, true, false)
this will result in true, cause it will do 64>0 (true/1) before the & - so every odd number becomes true
if you want the "correct" solution it has to look like:
if((i&64)>0, true, false)
or just
i&64 or toBoolean(i&64)
took me quite a while and help from an external to figure out, whats going on
Yes exactly - wanted the bitwise operation and also had the solution as written in the post. I just was wondering, why the mathematical operation > is executed before the &.
I don't know this for a fact, as the Expression language is IA's thing, but I highly suspect that it has to do with the order of precedence in Java, in which the > operator has a higher precedence than the & operator.