fix: false positive warnings for new properties (#2617) - #2618
Merged
triceo merged 1 commit intoAug 26, 2026
Merged
Conversation
The warning must only be logged when a legacy value is actually chosen over the new one, not merely because the requested name happens to have a known legacy counterpart (which may itself be unset). Closes TimefoldAI#2616.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR backports a fix to the Quarkus config fallback interceptor so that deprecation warnings are only emitted when a legacy (deprecated) configuration key is actually used to resolve a value, addressing false-positive warnings reported in #2616.
Changes:
- Stop logging warnings during name translation (
toLegacyName), and instead log only when a legacy value wins during resolution. - Refactor interceptor lookup to resolve exact/prefix/multi-legacy mappings through a single
resolveWithLegacyNames(...)path. - Add parameterized tests that assert warnings are logged only when legacy properties are defined/resolved, and not when only the new property is set.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| service/quarkus/runtime/src/main/java/ai/timefold/solver/service/quarkus/deployment/config/TimefoldRenamedPropertiesFallbackInterceptor.java | Moves warning emission to the point where a legacy ConfigValue is actually selected over the new key. |
| service/quarkus/runtime/src/test/java/ai/timefold/solver/service/quarkus/deployment/config/TimefoldRenamedPropertiesFallbackInterceptorTest.java | Adds log-capture-based tests to prevent regressions of false-positive deprecation warnings. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The warning must only be logged when a legacy value is actually chosen over the new one, not merely because the requested name happens to have a known legacy counterpart (which may itself be unset).
Closes #2616.
Backport of #2617.