Verified Commit 37c46d01 authored by Carlos Galindo's avatar Carlos Galindo
Browse files

Remove sliced statements from the try and catch's bodies.

parent da7b4ab0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@
        <dependency>
            <groupId>tfm</groupId>
            <artifactId>sdg-core</artifactId>
            <version>1.2.2</version>
            <version>1.2.3</version>
        </dependency>
    </dependencies>
</project>
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@

    <groupId>tfm</groupId>
    <artifactId>sdg-core</artifactId>
    <version>1.2.2</version>
    <version>1.2.3</version>

    <properties>
        <maven.compiler.source>11</maven.compiler.source>
+6 −2
Original line number Diff line number Diff line
@@ -180,11 +180,15 @@ public class SlicePruneVisitor extends ModifierVisitor<Set<Node>> {

    @Override
    public Visitable visit(TryStmt n, Set<Node> arg) {
        return arg.contains(n) ? n : null;
        boolean keep = arg.contains(n);
        super.visit(n, arg);
        return keep ? n : null;
    }

    @Override
    public Visitable visit(CatchClause n, Set<Node> arg) {
        return arg.contains(n) ? n : null;
        boolean keep = arg.contains(n);
        super.visit(n, arg);
        return keep ? n : null;
    }
}