Skip to content

Commit c87054e

Browse files
committed
Sanity check for #148.
1 parent fdc5b5d commit c87054e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/analysis/StreamStateMachine.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,6 +1186,10 @@ private void fillInstanceToStreamMap(Set<Stream> streamSet, EclipseProjectAnalys
11861186
}
11871187
instanceToStreamMap.put(instanceKey, stream);
11881188
} // end each stream.
1189+
1190+
// sanity check since it's a bijection.
1191+
if (instanceToStreamMap.size() != streamSet.size())
1192+
throw new IllegalArgumentException("Stream set does not produce a bijection of instance keys.");
11891193
}
11901194

11911195
public Collection<InstanceKey> getTrackedInstances() {

0 commit comments

Comments
 (0)