mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-20 05:21:29 +07:00
[java-decompiler] IDEA-346312 adapt patches
- fix switch in more working way GitOrigin-RevId: 485da13352e66780cf9a83dab105d3ecddbb6c60
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f0c639a4a2
commit
7e62370666
@@ -89,7 +89,7 @@ public final class InitializerProcessor {
|
||||
for (MethodWrapper method : wrapper.getMethods()) {
|
||||
if (CodeConstants.INIT_NAME.equals(method.methodStruct.getName()) && method.root != null) {
|
||||
Statement firstData = Statements.findFirstData(method.root);
|
||||
if (firstData == null || firstData.getExprents().isEmpty()) {
|
||||
if (firstData == null || firstData.getExprents() == null || firstData.getExprents().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ public final class EliminateLoopsHelper {
|
||||
|
||||
if(ret) {
|
||||
SequenceHelper.condenseSequences(root);
|
||||
StackVarsProcessor.simplifyStackVars(root, mt, cl);
|
||||
|
||||
Set<Integer> setReorderedIfs = new HashSet<>();
|
||||
|
||||
@@ -82,10 +81,9 @@ public final class EliminateLoopsHelper {
|
||||
for (Statement statement : switchStatement.getCaseStatements()) {
|
||||
allEdges.addAll(statement.getAllSuccessorEdges());
|
||||
}
|
||||
Statement finalParentloop = parentloop;
|
||||
//not a good workaround, but there is not another key, because edges are broken at this moment
|
||||
if (allEdges.stream()
|
||||
.anyMatch(edge -> edge.getType() == StatEdge.EdgeType.BREAK &&
|
||||
edge.closure == finalParentloop)) {
|
||||
.anyMatch(edge -> edge.closure.type == Statement.StatementType.DO)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user