Skip to content

GROOVY-9993: clarify boundary cases for split property definition (field and property of same name) - #1538

Closed
paulk-asert wants to merge 10 commits into
apache:masterfrom
paulk-asert:groovy9993
Closed

paulk-asert wants to merge 10 commits into
apache:masterfrom
paulk-asert:groovy9993

Conversation

@paulk-asert

@paulk-asert paulk-asert commented Mar 30, 2021 •

Copy link
Copy Markdown
Contributor

When defining a property, getters and setters are automatically supplied unless an existing one is found. This same rule also applies to the backing field but to date many aspects of this rule have been under specified, e.g. what happens if the type given for the field and property aren't the same? This PR clarifies these edge cases and provides a more formal definition of the behavior (the different types mentioned earlier for example becomes a compiler error).

@paulk-asert paulk-asert changed the title Groovy9993 GROOVY-9993: clarify boundary cases for split property definition (field and property of same name) Mar 30, 2021
@paulk-asert

Copy link
Copy Markdown
Contributor Author

See also GROOVY-8659 (might require further work)

…f boundary cases (package scope should know about split properties)
…f boundary cases (test cases for properties with init values)
…f boundary cases (documentation and property with annotation example)
…f boundary cases (delayed checking of duplicate fields and properties)
…f boundary cases (ignore @CompileStatic on properties - never used, just transferred to accessor methods for a split property)
…f boundary cases (ignore AST transforms on property nodes - never relevant just transferred to accessor methods for split properties)
…f boundary cases (adjust verifier to know about copying annotations for split properties)
…f boundary cases (delay duplicate checking, instead check for mismatch types and expand split properties up front) (closes apache#1538)
@asfgit asfgit closed this in 2381666 Apr 1, 2021
codeconsole added a commit to codeconsole/groovy that referenced this pull request Sep 26, 2026
Replaces the previous commit's pinning of Jackson 2's limits. Jackson 3
lowered the default nesting depth to 500 because fuzzers reached a
StackOverflowError before the old 1000-level limit (jackson-core apache#1233), and
raised the default string length to 100,000,000 after users hit 20,000,000
with legitimate payloads (jackson-core apache#1538). groovy-yaml, groovy-toml and
groovy-csv now take those defaults, which keeps the threat model's stance
that their bounds are the dependency's, not a Groovy decision.

The limit tests now document the Jackson 3 values, and the threat model and
JsonSlurper's comment no longer say its 1000-level cap matches the Jackson
the slurpers use.
codeconsole added a commit to codeconsole/groovy that referenced this pull request Oct 18, 2026
Replaces the previous commit's pinning of Jackson 2's limits. Jackson 3
lowered the default nesting depth to 500 because fuzzers reached a
StackOverflowError before the old 1000-level limit (jackson-core apache#1233), and
raised the default string length to 100,000,000 after users hit 20,000,000
with legitimate payloads (jackson-core apache#1538). groovy-yaml, groovy-toml and
groovy-csv now take those defaults, which keeps the threat model's stance
that their bounds are the dependency's, not a Groovy decision.

The limit tests now document the Jackson 3 values, and the threat model and
JsonSlurper's comment no longer say its 1000-level cap matches the Jackson
the slurpers use.
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