From 3325a4b573d65f7b8e2e7b5e610abd312e399b19 Mon Sep 17 00:00:00 2001 From: jjenista Date: Thu, 13 Oct 2011 02:34:32 +0000 Subject: [PATCH] Bug fix, sometimes an edge matches except it has a different type of source node, so check for that instead of blindly casting and causing an exception --- Robust/src/Analysis/Disjoint/RefEdge.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Robust/src/Analysis/Disjoint/RefEdge.java b/Robust/src/Analysis/Disjoint/RefEdge.java index 1d0e349e..157d7d53 100644 --- a/Robust/src/Analysis/Disjoint/RefEdge.java +++ b/Robust/src/Analysis/Disjoint/RefEdge.java @@ -104,11 +104,21 @@ public class RefEdge { if( src instanceof VariableNode ) { VariableNode vsrc = (VariableNode) src; + + if( !(edge.src instanceof VariableNode) ) { + return false; + } + if( !vsrc.equals( (VariableNode) edge.src ) ) { return false; } } else { HeapRegionNode hsrc = (HeapRegionNode) src; + + if( !(edge.src instanceof HeapRegionNode) ) { + return false; + } + if( !hsrc.equalsIncludingAlphaAndPreds( (HeapRegionNode) edge.src ) ) { return false; } -- 2.34.1