Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Duplicate
-
3.0.9
-
None
Description
Before, Groovy 2 only generates one getter for a Boolean field.
But now Groovy 3 generates two, it breaks some ORM frameworks (ex: MyBatis, it can not decide which getter to be used) and breaks JSON output.
And the meaning of `isFlag` is wrong, it should not return `Boolean` in my mind.
@CompileStatic class Foo { Boolean flag static void main(String[] args) { Foo foo = new Foo() println(foo.getFlag()) println(foo.isFlag()) // should not generate the `isFlag` getter } }
Attachments
Issue Links
- is related to
-
GROOVY-9382 Inconsistent support for [Bb]oolean properties
- Closed
-
GROOVY-10133 Inconsistent method selection for [Bb]oolean properties
- Closed
- relates to
-
GROOVY-10707 Regression in property access for conflicting isXxx and getXxx accessors
- Closed
-
GROOVY-10708 Property access for wrapped vs. primitive boolean
- Closed