Skip to content

fix: entities use equality comparison#2301

Merged
triceo merged 5 commits into
TimefoldAI:mainfrom
triceo:sequenced
May 12, 2026
Merged

fix: entities use equality comparison#2301
triceo merged 5 commits into
TimefoldAI:mainfrom
triceo:sequenced

Conversation

@triceo

@triceo triceo commented May 12, 2026

Copy link
Copy Markdown
Collaborator

Removes identity comparisons from Constraint Streams, since that is a bug which we recently fixed for value ranges as well.
Also improves Javadoc around entities, facts and collections.

Downstream bug fix: TimefoldAI/timefold-quickstarts#1077 (review)

Copilot AI review requested due to automatic review settings May 12, 2026 06:55
@triceo triceo requested a review from zepfred May 12, 2026 06:56
@triceo triceo added this to the v2.1.0 milestone May 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the public API annotation Javadocs for solution collection properties to recommend Java 21’s SequencedCollection as the preferred way to guarantee deterministic iteration order (important for solver reproducibility).

Changes:

  • Update Javadocs in collection property annotations to recommend SequencedCollection (with examples such as List and LinkedHashSet).
  • Add SequencedCollection imports to support the new Javadoc links.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
core/src/main/java/ai/timefold/solver/core/api/domain/solution/ProblemFactCollectionProperty.java Javadoc recommendation updated to SequencedCollection; imports adjusted (currently leaves an unused import).
core/src/main/java/ai/timefold/solver/core/api/domain/solution/PlanningEntityCollectionProperty.java Same Javadoc update for entity collections; imports adjusted (currently leaves an unused import).

@triceo triceo changed the title chore: improve collection property Javadocs with SequencedCollection chore: make it clear that entities use equality comparison May 12, 2026
@triceo triceo changed the title chore: make it clear that entities use equality comparison fix: entities use equality comparison May 12, 2026
Copilot AI review requested due to automatic review settings May 12, 2026 07:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Comment thread core/src/main/java/ai/timefold/solver/core/api/domain/entity/PlanningEntity.java Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Comment thread docs/src/modules/ROOT/pages/using-timefold-solver/modeling-planning-problems.adoc Outdated
Comment thread core/src/main/java/ai/timefold/solver/core/api/domain/entity/PlanningEntity.java Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Comment thread core/src/main/java/ai/timefold/solver/core/api/domain/entity/PlanningEntity.java Outdated
Comment thread docs/src/modules/ROOT/pages/using-timefold-solver/modeling-planning-problems.adoc Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Comment thread docs/src/modules/ROOT/pages/using-timefold-solver/modeling-planning-problems.adoc Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Comment thread core/src/main/java/ai/timefold/solver/core/api/domain/common/PlanningId.java Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
14.3% Coverage on New Code (required ≥ 70%)

See analysis details on SonarQube Cloud

@zepfred zepfred left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@triceo triceo self-assigned this May 12, 2026
@triceo triceo merged commit 7776460 into TimefoldAI:main May 12, 2026
24 of 26 checks passed
@triceo triceo deleted the sequenced branch May 12, 2026 11:28
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.

Auto-upgrader should recommend changing HashSet to SequencedSet, not SortedSet

3 participants