Skip to content

Conversation

@Christopher-Chianelli
Copy link
Contributor

Fixes #2054

@sonarqubecloud
Copy link

this.value = value;
var start = startMapping.apply(value);
var end = endMapping.apply(value);
if (start.compareTo(end) > 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a performance regression in a place where we likely can't afford one, especially if it's only to throw a different exception than would have been thrown anyway.

Is there perhaps a way to throw this exception in a place where we already have to do this comparison? Otherwise I'm considering just not fixing this; IMO this exception brings little additional value over the other exception.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really (as we don't compare start and end value); TreeMap.subMap will throw the exception when it is eventually reached.

@triceo
Copy link
Collaborator

triceo commented Jan 28, 2026

It was agreed that we would not fix this.

@triceo triceo closed this Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non-descriptive error when using ConstraintCollectors.toConnectedTemporalRanges

2 participants