Closed GoogleCodeExporter closed 8 years ago
Hi Benjamin,
thanks for your comment.
The difference between the "bitwise OR" ("|") and the "conditional OR"/"logical
OR" ("||") is that the bitwise OR enforces the execution of all expressions,
whereas the logical OR aborts the evaluation of arguments as soon as one
expression evaluates to "true".
Check this example class (attached) to see the difference.
Also cf. http://docstore.mik.ua/orelly/java/langref/ch04_10.htm and
http://docstore.mik.ua/orelly/java/langref/ch04_11.htm for some explanation of
the differences between | and ||.
As a conclusion, it would simply be incorrect to use || in this context, as the
filter pipe would not get evaluated completely. (You probably now also see a
connection to bash-style pipes, which is more that just a co-incidence, and now
you also know why this software is called boiler*pipe* ;-)
Cheers,
Christian
Original comment by ckkohl79
on 21 Nov 2010 at 12:10
Attachments:
Wow. Learned something new today! Thanks =)
Original comment by benjamin...@gmail.com
on 21 Nov 2010 at 8:03
You are welcome :)
Best,
Christian
Original comment by ckkohl79
on 21 Nov 2010 at 8:07
Original issue reported on code.google.com by
benjamin...@gmail.com
on 21 Nov 2010 at 7:37