Commit eeac3bbc authored by Carlos Galindo's avatar Carlos Galindo
Browse files

Minor fixes

* DataDependencyArc: change style
* Exit/ReturnNode: removed variable extraction
* ESCFG: removed the method call as an exception source.
parent 81b8002d
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.0.0</version>
            <version>1.0.1</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@

    <groupId>tfm</groupId>
    <artifactId>sdg-core</artifactId>
    <version>1.0.0</version>
    <version>1.0.1</version>

    <properties>
        <maven.compiler.source>11</maven.compiler.source>
+1 −2
Original line number Diff line number Diff line
@@ -57,8 +57,7 @@ public class DataDependencyArc extends Arc {
    @Override
    public Map<String, Attribute> getDotAttributes() {
        Map<String, Attribute> map = super.getDotAttributes();
        map.put("style", DefaultAttribute.createAttribute("dashed"));
        map.put("color", DefaultAttribute.createAttribute("red"));
        map.put("color", DefaultAttribute.createAttribute(target.isDefinition() ? "pink" : "red"));
        return map;
    }
}
+0 −7
Original line number Diff line number Diff line
@@ -60,10 +60,6 @@ public class ESCFG extends ACFG {
                exceptions.put(t, true);
        }

        public ExceptionSource(GraphNode<?> source, Collection<ResolvedType> exceptionTypes) {
            this(source, exceptionTypes.toArray(ResolvedType[]::new));
        }

        public void deactivateTypes(ResolvedReferenceType type) {
            exceptions.keySet().stream().filter(type::isAssignableBy).forEach(t -> exceptions.put(t, false));
        }
@@ -274,9 +270,6 @@ public class ESCFG extends ACFG {
                clearHanging();
            }

            // Add an exception source for the call node
            populateExceptionSourceMap(new ExceptionSource(stmtNode, resolved.getSpecifiedExceptions()));

            // Register set of return nodes
            pendingNormalReturnNodes.put(normalReturn, returnNodes);

+4 −2
Original line number Diff line number Diff line
@@ -3,12 +3,14 @@ package tfm.nodes;
import com.github.javaparser.ast.body.MethodDeclaration;
import tfm.nodes.type.NodeType;

import java.util.LinkedList;

public class ExitNode extends SyntheticNode<MethodDeclaration> {
    public ExitNode(MethodDeclaration astNode) {
        super(NodeType.METHOD_EXIT, "Exit", astNode);
        super(NodeType.METHOD_EXIT, "Exit", astNode, new LinkedList<>());
    }

    protected ExitNode(NodeType type, String instruction, MethodDeclaration astNode) {
        super(type, instruction, astNode);
        super(type, instruction, astNode, new LinkedList<>());
    }
}
Loading