Skip to content

GROOVY-12709: stop following field initializers that refer back to ea… - #3239

Merged
paulk-asert merged 1 commit into
apache:masterfrom
paulk-asert:groovy12709
Nov 6, 2026
Merged

paulk-asert merged 1 commit into
apache:masterfrom
paulk-asert:groovy12709

Conversation

@paulk-asert

Copy link
Copy Markdown
Contributor

…ch other

CheckingVisitor.findConstExp followed field initializers with no record of the fields already visited, so fields whose initializers formed a cycle (static String A = B; static String B = A) made RegexChecker and FormatStringChecker overflow the stack. Track the variables followed during a lookup and treat a repeat as having no constant value.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.1795%. Comparing base (04b8160) to head (470468b).

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##               master      #3239        +/-   ##
==================================================
+ Coverage     74.1763%   74.1795%   +0.0032%     
- Complexity      43806      43809         +3     
==================================================
  Files            1692       1692                
  Lines          149758     149761         +3     
  Branches        28417      28418         +1     
==================================================
+ Hits           111085     111092         +7     
- Misses          28465      28466         +1     
+ Partials        10208      10203         -5     
Files with missing lines Coverage Δ
.../apache/groovy/typecheckers/CheckingVisitor.groovy 89.4737% <100.0000%> (+1.9737%) ⬆️

... and 9 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

This comment has been minimized.

…ch other

CheckingVisitor.findConstExp followed field initializers with no record of
the fields already visited, so fields whose initializers formed a cycle
(static String A = B; static String B = A) made RegexChecker and
FormatStringChecker overflow the stack. Track the variables followed during
a lookup and treat a repeat as having no constant value.
@paulk-asert
paulk-asert merged commit a9cdf67 into apache:master Nov 6, 2026
2 of 24 checks passed
@paulk-asert
paulk-asert deleted the groovy12709 branch November 6, 2026 04:12
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.

2 participants