From 089e466e81dc18fcf8c569aa8a3b50d312a91cfc Mon Sep 17 00:00:00 2001 From: delwi Date: Mon, 8 Feb 1999 16:02:02 +0000 Subject: [PATCH] A new exception for CheckNullOperator git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@231 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/expr/ComplexExpression.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/jode/jode/expr/ComplexExpression.java b/jode/jode/expr/ComplexExpression.java index 25479c3..88da187 100644 --- a/jode/jode/expr/ComplexExpression.java +++ b/jode/jode/expr/ComplexExpression.java @@ -211,9 +211,11 @@ public class ComplexExpression extends Expression { boolean changed = false; for (int i=0; i < subExpressions.length; i++) { Type opType; - if (i == 0 && operator instanceof ArrayStoreOperator) { + if (operator instanceof CheckNullOperator + || i == 0 && operator instanceof ArrayStoreOperator) { /* No rule without exception: * We can always use tSubType, except for the + * check null operator and the * array operand of an array store instruction. */ opType = operator.getOperandType(i); @@ -239,11 +241,12 @@ public class ComplexExpression extends Expression { Type types[] = new Type[subExpressions.length]; boolean changed = false; for (int i=0; i < types.length; i++) { - if (i == 0 && operator instanceof ArrayStoreOperator) { + if (operator instanceof CheckNullOperator + || i == 0 && operator instanceof ArrayStoreOperator) { /* No rule without exception: - * We can always use tSuperType, except for the - * array operand of an array store instruction. - */ + * We can always use tSuperType, except for the + * array operand of an array store instruction. + */ types[i] = subExpressions[i].getType(); } else types[i] = Type.tSuperType