[java decompiler] getting rid of deprecated API usage

GitOrigin-RevId: 4b575f5001e391224bd77fc71483ac0ab0c42787
master
Roman Shevchenko 4 years ago committed by intellij-monorepo-bot
parent 4814e96e8f
commit 03a6b01b83
  1. 11
      src/org/jetbrains/java/decompiler/modules/decompiler/decompose/DominatorTreeExceptionFilter.java

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler.decompose; package org.jetbrains.java.decompiler.modules.decompiler.decompose;
import org.jetbrains.java.decompiler.modules.decompiler.StatEdge; import org.jetbrains.java.decompiler.modules.decompiler.StatEdge;
@ -127,16 +127,15 @@ public class DominatorTreeExceptionFilter {
Set<Integer> range = entry.getValue(); Set<Integer> range = entry.getValue();
if (range.contains(id)) { if (range.contains(id)) {
Integer exit; Integer exit;
if (!range.contains(childid)) { if (!range.contains(childid)) {
exit = childid; exit = childid;
} }
else if (map.containsKey(handler)) {
exit = -1;
}
else { else {
// after replacing 'new Integer(-1)' with '-1' Eclipse throws a NullPointerException on the following line exit = mapChild.get(handler);
// could be a bug in Eclipse or some obscure specification glitch, FIXME: needs further investigation
exit = map.containsKey(handler) ? new Integer(-1) : mapChild.get(handler);
} }
if (exit != null) { if (exit != null) {

Loading…
Cancel
Save