Skip to content

Commit

Permalink
fix: test codes fail because of the previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ewt45 committed Dec 30, 2024
1 parent b64458d commit 99a247d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions jadx-core/src/main/java/jadx/core/utils/BlockUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ public static BlockNode getPathCross(MethodNode mth, Collection<BlockNode> 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);
Expand All @@ -809,7 +809,6 @@ public static BlockNode getPathCross(MethodNode mth, Collection<BlockNode> block
BitSet domFrontier = block.getDomFrontier();
if (!domFrontier.isEmpty()) {
combinedDF.or(domFrontier);
combinedDF.clear(block.getId());
}
});
combinedDF.andNot(excluded);
Expand All @@ -831,18 +830,13 @@ public static BlockNode getPathCross(MethodNode mth, Collection<BlockNode> 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) {
Expand Down

0 comments on commit 99a247d

Please sign in to comment.