Skip to content

Commit 8513b20

Browse files
committed
Additional logging for bijection.
1 parent 8f5876a commit 8513b20

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,15 @@ private void fillInstanceToStreamMap(Set<Stream> streamSet, EclipseProjectAnalys
12101210
++skippedStreams;
12111211
continue; // next stream.
12121212
}
1213-
instanceToStreamMap.put(instanceKey, stream);
1213+
1214+
// add the mapping.
1215+
Stream oldValue = instanceToStreamMap.put(instanceKey, stream);
1216+
1217+
// if mapping a different value.
1218+
if (oldValue != null && oldValue != stream)
1219+
LOGGER.warning("Reassociating stream: " + stream.getCreation() + " with: " + instanceKey
1220+
+ ". Old stream was: " + oldValue.getCreation() + ".");
1221+
12141222
} // end each stream.
12151223

12161224
// sanity check since it's a bijection.

0 commit comments

Comments
 (0)