[java-decompiler] unneeded cast around byte/short constants

This commit is contained in:
Roman Shevchenko
2016-04-20 19:52:08 +02:00
parent a00952f338
commit b366de8eb4
5 changed files with 12 additions and 12 deletions

View File

@@ -891,7 +891,7 @@ public class ExprProcessor implements CodeConstants {
castAlways ||
(!leftType.isSuperset(rightType) && (rightType.equals(VarType.VARTYPE_OBJECT) || leftType.type != CodeConstants.TYPE_OBJECT)) ||
(castNull && rightType.type == CodeConstants.TYPE_NULL && !UNDEFINED_TYPE_STRING.equals(getTypeName(leftType))) ||
(isIntConstant(exprent) && VarType.VARTYPE_INT.isStrictSuperset(leftType));
(isIntConstant(exprent) && rightType.isStrictSuperset(leftType));
boolean quote = cast && exprent.getPrecedence() >= FunctionExprent.getPrecedence(FunctionExprent.FUNCTION_CAST);