diff --git a/jadx-core/src/main/java/jadx/core/utils/BlockUtils.java b/jadx-core/src/main/java/jadx/core/utils/BlockUtils.java index 5a2d233e978..0d040b8e264 100644 --- a/jadx-core/src/main/java/jadx/core/utils/BlockUtils.java +++ b/jadx-core/src/main/java/jadx/core/utils/BlockUtils.java @@ -794,7 +794,7 @@ public static BlockNode getPathCross(MethodNode mth, Collection block mth.getLoops().forEach(l -> excluded.set(l.getStart().getId())); if (!mth.isNoExceptionHandlers()) { // exclude exception handlers paths - mth.getExceptionHandlers().forEach(h -> mergeExcHandlerDomFrontier(mth, h, excluded)); + mth.getExceptionHandlers().forEach(h -> addExcHandler(mth, h, excluded)); } domFrontBS.andNot(excluded); oneBlock = bitSetToOneBlock(mth, domFrontBS); @@ -809,7 +809,6 @@ public static BlockNode getPathCross(MethodNode mth, Collection block BitSet domFrontier = block.getDomFrontier(); if (!domFrontier.isEmpty()) { combinedDF.or(domFrontier); - combinedDF.clear(block.getId()); } }); combinedDF.andNot(excluded); @@ -831,18 +830,13 @@ public static BlockNode getPathCross(MethodNode mth, Collection block } } - private static void mergeExcHandlerDomFrontier(MethodNode mth, ExceptionHandler handler, BitSet set) { + private static void addExcHandler(MethodNode mth, ExceptionHandler handler, BitSet set) { BlockNode handlerBlock = handler.getHandlerBlock(); if (handlerBlock == null) { mth.addDebugComment("Null handler block in: " + handler); return; } - BitSet domFrontier = handlerBlock.getDomFrontier(); - if (domFrontier == null) { - mth.addDebugComment("Null dom frontier in handler: " + handler); - return; - } - set.or(domFrontier); + set.set(handlerBlock.getId()); } public static BlockNode getPathCross(MethodNode mth, BlockNode b1, BlockNode b2) {