Skip to content

refactor: remove remaining deprecation from public API#2124

Open
triceo wants to merge 3 commits intoTimefoldAI:mainfrom
triceo:old
Open

refactor: remove remaining deprecation from public API#2124
triceo wants to merge 3 commits intoTimefoldAI:mainfrom
triceo:old

Conversation

@triceo
Copy link
Collaborator

@triceo triceo commented Feb 14, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

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 removes the remaining deprecated elements from the public domain annotations (pinning filter and legacy “difficulty/strength/nullable” sorting attributes) and updates the internal descriptor processing plus test domains to use the non-deprecated replacement APIs.

Changes:

  • Removed deprecated public API elements: PinningFilter, PlanningEntity.pinningFilter, PlanningVariable.nullable, and legacy difficulty/strength sorting attributes.
  • Updated EntityDescriptor/BasicVariableDescriptor to stop interpreting deprecated annotation attributes and to rely on the modern comparator* and allowsUnassigned properties.
  • Refactored/trimmed test domains and tests that exercised the deprecated APIs (including removing entire legacy test models).

Reviewed changes

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

Show a summary per file
File Description
core/src/main/java/ai/timefold/solver/core/api/domain/entity/PinningFilter.java Removed deprecated pinning-filter API.
core/src/main/java/ai/timefold/solver/core/api/domain/entity/PlanningEntity.java Removed deprecated pinningFilter/difficulty* attributes; keeps comparator-based sorting.
core/src/main/java/ai/timefold/solver/core/api/domain/variable/PlanningVariable.java Removed deprecated nullable/strength* attributes.
core/src/main/java/ai/timefold/solver/core/impl/domain/entity/descriptor/EntityDescriptor.java Removed pinningFilter handling and legacy difficulty* sorting handling.
core/src/main/java/ai/timefold/solver/core/impl/domain/variable/descriptor/BasicVariableDescriptor.java Removed nullable and legacy strength* sorting handling; uses allowsUnassigned() directly.
core/src/test/java/ai/timefold/solver/core/impl/constructionheuristic/DefaultConstructionHeuristicPhaseTest.java Updated pinned-entity constructions; removed tests tied to deprecated strength/difficulty APIs.
core/src/test/java/ai/timefold/solver/core/impl/constructionheuristic/placer/entity/QueuedEntityPlacerFactoryTest.java Switched test domain used for entity sorting to a comparator-based solution descriptor.
core/src/test/java/ai/timefold/solver/core/impl/domain/entity/descriptor/EntityDescriptorTest.java Removed tests covering deprecated pinningFilter-based movable filters.
core/src/test/java/ai/timefold/solver/core/impl/exhaustivesearch/DefaultExhaustiveSearchPhaseTest.java Updated pinned-entity constructions to the new pinned model.
core/src/test/java/ai/timefold/solver/core/impl/localsearch/DefaultLocalSearchPhaseTest.java Updated pinned-entity constructions to the new pinned model.
core/src/test/java/ai/timefold/solver/core/impl/solver/DefaultSolverTest.java Updated pinned-entity constructions to the new pinned model.
core/src/test/java/ai/timefold/solver/core/testdomain/comparable/TestdataDifficultyComparingEntity.java Migrated from legacy difficulty/strength comparator attributes to comparatorClass.
core/src/test/java/ai/timefold/solver/core/testdomain/difficultyweight/TestdataDifficultyFactory.java Deleted legacy difficulty-weight factory test domain.
core/src/test/java/ai/timefold/solver/core/testdomain/difficultyweight/TestdataDifficultyWeightEntity.java Deleted legacy difficulty-weight entity test domain.
core/src/test/java/ai/timefold/solver/core/testdomain/difficultyweight/TestdataDifficultyWeightSolution.java Deleted legacy difficulty-weight solution test domain.
core/src/test/java/ai/timefold/solver/core/testdomain/difficultyweight/TestdataDifficultyWeightValue.java Deleted legacy difficulty-weight value test domain.
core/src/test/java/ai/timefold/solver/core/testdomain/inheritance/entity/single/baseannotated/classes/pinned/TestdataExtendedPinningFilter.java Deleted legacy pinningFilter-based pinning test domain.
core/src/test/java/ai/timefold/solver/core/testdomain/inheritance/entity/single/baseannotated/classes/pinned/TestdataExtendedPinnedEntity.java Updated to remove pinningFilter-based fields/constructors; relies on @PlanningPin.
core/src/test/java/ai/timefold/solver/core/testdomain/list/sort/comparator/TestdataListSortableEntity.java Migrated from legacy difficulty comparator attribute to comparatorClass.
core/src/test/java/ai/timefold/solver/core/testdomain/list/sort/factory/TestdataListFactorySortableEntity.java Migrated from legacy difficulty weight factory attribute to comparatorFactoryClass.
core/src/test/java/ai/timefold/solver/core/testdomain/list/valuerange/sort/comparator/TestdataListSortableEntityProvidingEntity.java Migrated from legacy difficulty comparator attribute to comparatorClass.
core/src/test/java/ai/timefold/solver/core/testdomain/list/valuerange/sort/factory/TestdataListFactorySortableEntityProvidingEntity.java Migrated from legacy difficulty weight factory attribute to comparatorFactoryClass.
core/src/test/java/ai/timefold/solver/core/testdomain/mixed/multientity/TestdataMixedMultiEntityFirstEntity.java Migrated from legacy difficulty comparator attribute to comparatorClass.
core/src/test/java/ai/timefold/solver/core/testdomain/mixed/multientity/TestdataMixedMultiEntitySecondEntity.java Migrated from legacy strength comparator attribute to comparatorClass.
core/src/test/java/ai/timefold/solver/core/testdomain/mixed/singleentity/TestdataMixedEntity.java Migrated from legacy difficulty/strength comparator attributes to comparatorClass.
core/src/test/java/ai/timefold/solver/core/testdomain/pinned/TestdataPinnedEntity.java Removed legacy pinningFilter/locked state; pinning now only via @PlanningPin.
core/src/test/java/ai/timefold/solver/core/testdomain/pinned/TestdataPinningFilter.java Deleted legacy pinningFilter test helper.
core/src/test/java/ai/timefold/solver/core/testdomain/pinned/unassignedvar/TestdataAllowsUnassignedPinningFilter.java Deleted legacy pinningFilter test helper.
core/src/test/java/ai/timefold/solver/core/testdomain/pinned/unassignedvar/TestdataPinnedAllowsUnassignedEntity.java Removed legacy pinningFilter/locked state; pinning via @PlanningPin.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/comparatordifficulty/OneValuePerEntityDifficultyEasyScoreCalculator.java Deleted legacy difficulty/strength sorting test domain.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/comparatordifficulty/TestdataDifficultySortableEntity.java Deleted legacy difficulty/strength sorting test domain.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/comparatordifficulty/TestdataDifficultySortableSolution.java Deleted legacy difficulty/strength sorting test domain.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/comparator/TestdataComparatorSortableSolution.java Updated solution descriptor construction to reflect simplified descriptor building.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/comparator/TestdataComparatorSortableEntityProvidingEntity.java Migrated planning entity/variable sorting attributes to comparatorClass.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/factory/TestdataFactorySortableEntityProvidingEntity.java Migrated planning entity sorting attribute to comparatorFactoryClass.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/factorydifficulty/OneValuePerEntityDifficultyFactoryEasyScoreCalculator.java Deleted legacy difficulty/strength sorting test domain.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/factorydifficulty/TestdataDifficultyFactorySortableEntity.java Deleted legacy difficulty/strength sorting test domain.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/factorydifficulty/TestdataDifficultyFactorySortableSolution.java Deleted legacy difficulty/strength sorting test domain.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/TestdataInvalidMixedComparatorSortableEntity.java Package adjusted to match remaining invalid-sort test model organization.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/TestdataInvalidMixedComparatorSortableSolution.java Package adjusted to match remaining invalid-sort test model organization.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/mixed/strength/TestdataInvalidMixedStrengthSortableEntity.java Deleted invalid test model tied to removed strength APIs.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/mixed/strength/TestdataInvalidMixedStrengthSortableSolution.java Deleted invalid test model tied to removed strength APIs.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/twocomparator/entity/TestdataInvalidTwoEntityComparatorSortableEntity.java Deleted invalid test model tied to removed legacy comparator attributes.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/twocomparator/entity/TestdataInvalidTwoEntityComparatorSortableSolution.java Deleted invalid test model tied to removed legacy comparator attributes.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/twocomparator/value/TestdataInvalidTwoValueComparatorSortableEntity.java Deleted invalid test model tied to removed legacy comparator attributes.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/twocomparator/value/TestdataInvalidTwoValueComparatorSortableSolution.java Deleted invalid test model tied to removed legacy comparator attributes.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/twofactory/entity/TestdataInvalidTwoEntityFactorySortableEntity.java Deleted invalid test model tied to removed legacy factory attributes.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/twofactory/entity/TestdataInvalidTwoEntityFactorySortableSolution.java Deleted invalid test model tied to removed legacy factory attributes.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/twofactory/value/TestdataInvalidTwoValueFactorySortableEntity.java Deleted invalid test model tied to removed legacy factory attributes.
core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/twofactory/value/TestdataInvalidTwoValueFactorySortableSolution.java Deleted invalid test model tied to removed legacy factory attributes.
core/src/test/java/ai/timefold/solver/core/testdomain/valuerange/sort/comparatorstrength/OneValuePerEntityStrengthRangeEasyScoreCalculator.java Deleted legacy strength-range test domain.
core/src/test/java/ai/timefold/solver/core/testdomain/valuerange/sort/comparatorstrength/TestdataStrengthSortableEntityProvidingEntity.java Deleted legacy strength-range test domain.
core/src/test/java/ai/timefold/solver/core/testdomain/valuerange/sort/comparatorstrength/TestdataStrengthSortableEntityProvidingSolution.java Deleted legacy strength-range test domain.
core/src/test/java/ai/timefold/solver/core/testdomain/valuerange/sort/factorystrength/OneValuePerEntityStrengthFactoryRangeEasyScoreCalculator.java Deleted legacy strength-range test domain.
core/src/test/java/ai/timefold/solver/core/testdomain/valuerange/sort/factorystrength/TestdataStrengthFactorySortableEntityProvidingEntity.java Deleted legacy strength-range test domain.
core/src/test/java/ai/timefold/solver/core/testdomain/valuerange/sort/factorystrength/TestdataStrengthFactorySortableEntityProvidingSolution.java Deleted legacy strength-range test domain.

Copy link
Contributor

Copilot AI left a comment

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 130 out of 130 changed files in this pull request and generated 1 comment.

Copy link
Contributor

Copilot AI left a comment

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 131 out of 131 changed files in this pull request and generated no new comments.

Copy link
Contributor

Copilot AI left a comment

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 141 out of 141 changed files in this pull request and generated no new comments.

@sonarqubecloud
Copy link

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.

1 participant