Skip to content

GROOVY-12030: Graduate PropertyHandler from incubating to stable#2554

Merged
daniellansun merged 1 commit into
apache:masterfrom
paulk-asert:groovy12030
May 23, 2026
Merged

GROOVY-12030: Graduate PropertyHandler from incubating to stable#2554
daniellansun merged 1 commit into
apache:masterfrom
paulk-asert:groovy12030

Conversation

@paulk-asert
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
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 addresses GROOVY-12030 by promoting groovy.transform.options.PropertyHandler from incubating to a stable API surface, strengthening its contract via clearer Javadoc and adding focused regression tests to lock in compile-time behavior.

Changes:

  • Removed @Incubating from PropertyHandler and expanded its Javadoc to describe lifecycle/ordering and instantiation semantics.
  • Fixed attribute-validation behavior by having isValidAttribute check AnnotationNode.getMember(...) (so non-ConstantExpression members like list-valued attributes are detected).
  • Added a dedicated JUnit test verifying custom handler loading, initialization control, attribute rejection, and default-handler fallback.

Reviewed changes

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

File Description
src/test/groovy/groovy/transform/options/PropertyHandlerTest.groovy New tests that exercise compile-time loading/validation of custom PropertyHandler implementations.
src/main/java/groovy/transform/options/PropertyHandler.java Graduates API to stable, improves Javadoc contract, and fixes isValidAttribute to detect non-constant members.
src/main/java/groovy/transform/options/DefaultPropertyHandler.java Simplifies validateAttributes implementation to return true directly.

Comment thread src/main/java/groovy/transform/options/PropertyHandler.java
Comment thread src/test/groovy/groovy/transform/options/PropertyHandlerTest.groovy Outdated
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.1945%. Comparing base (5318145) to head (310251d).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##               master      #2554        +/-   ##
==================================================
+ Coverage     68.1844%   68.1945%   +0.0101%     
- Complexity      33086      33098        +12     
==================================================
  Files            1508       1508                
  Lines          126130     126145        +15     
  Branches        22878      22886         +8     
==================================================
+ Hits            86001      86024        +23     
+ Misses          32490      32485         -5     
+ Partials         7639       7636         -3     
Files with missing lines Coverage Δ
...oovy/transform/options/DefaultPropertyHandler.java 92.3077% <100.0000%> (-0.2849%) ⬇️
...java/groovy/transform/options/PropertyHandler.java 62.9630% <100.0000%> (+14.8148%) ⬆️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@testlens-app
Copy link
Copy Markdown

testlens-app Bot commented May 23, 2026

✅ All tests passed ✅

🏷️ Commit: 310251d
▶️ Tests: 47378 executed
⚪️ Checks: 28/28 completed


Learn more about TestLens at testlens.app.

@daniellansun daniellansun merged commit 121c860 into apache:master May 23, 2026
29 checks passed
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.

4 participants