Avoid assignment used as condition

GitOrigin-RevId: 6eb52135a5bfdf772bb10d3120648500a95325a4
master
Tagir Valeev 4 years ago committed by intellij-monorepo-bot
parent ede143d4bd
commit e16fb8ef1d
  1. 22
      src/org/jetbrains/java/decompiler/modules/decompiler/IfHelper.java

@ -31,7 +31,8 @@ public final class IfHelper {
res |= mergeAllIfsRec(st, setReorderedIfs);
// collapse composed if's
if (changed = mergeIfs(st, setReorderedIfs)) {
if (mergeIfs(st, setReorderedIfs)) {
changed = true;
break;
}
}
@ -75,21 +76,25 @@ public final class IfHelper {
continue;
}
if (updated = collapseIfIf(rtnode)) {
if (collapseIfIf(rtnode)) {
updated = true;
break;
}
if (!setReorderedIfs.contains(stat.id)) {
if (updated = collapseIfElse(rtnode)) {
if (collapseIfElse(rtnode)) {
updated = true;
break;
}
if (updated = collapseElse(rtnode)) {
if (collapseElse(rtnode)) {
updated = true;
break;
}
}
if (updated = reorderIf((IfStatement)stat)) {
if (reorderIf((IfStatement)stat)) {
updated = true;
setReorderedIfs.add(stat.id);
break;
}
@ -440,10 +445,9 @@ public final class IfHelper {
if (sttemp == ifstat) {
break;
}
else {
if (elsedirectpath = existsPath(sttemp, next)) {
break;
}
else if (existsPath(sttemp, next)) {
elsedirectpath = true;
break;
}
}
}

Loading…
Cancel
Save