Skip to content

Commit 8f5876a

Browse files
committed
Log warning instead of throwing an exception.
For sanity check on bijection between stream objects and stream instance keys.
1 parent d879ed4 commit 8f5876a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,8 +1214,10 @@ private void fillInstanceToStreamMap(Set<Stream> streamSet, EclipseProjectAnalys
12141214
} // end each stream.
12151215

12161216
// sanity check since it's a bijection.
1217-
if (instanceToStreamMap.size() != streamSet.size() - skippedStreams)
1218-
throw new IllegalArgumentException("Stream set does not produce a bijection of instance keys.");
1217+
if (instanceToStreamMap.keySet().size() != streamSet.size() - skippedStreams)
1218+
LOGGER.warning("Stream set of size: " + (streamSet.size() - skippedStreams)
1219+
+ " does not produce a bijection of instance keys of size: " + instanceToStreamMap.keySet().size()
1220+
+ ".");
12191221
}
12201222

12211223
public Collection<InstanceKey> getTrackedInstances() {

0 commit comments

Comments
 (0)