Fix for portions of expressions with constant values being preserved by ConstantBranchPruner.
Change on 2017/05/17 by kstanger
@@ -235,6 +235,9 @@ public class ConstantBranchPruner extends UnitTreeVisitor {
* The evaluated result of the expression may differ from the original.
*/
private Expression extractSideEffects(Expression expr) {
+ if (expr.getConstantValue() instanceof Boolean) {
+ return null;
+ }
switch (expr.getKind()) {
case INFIX_EXPRESSION:
{
