Migrated from Google Code (issue 4)
👤 reinierz 🕗 Jul 24, 2009 at 04:17 UTC
What steps will reproduce the problem?
Fix: If boolean field and the field name starts with 'has', use the field name as method name.
👤 r.spilker 🕗 Jul 24, 2009 at 11:04 UTC
Also, we might want to check if any of the is/has/get methods exists befor creating
👤 r.spilker 🕗 Jul 25, 2009 at 21:10 UTC
If the field starts with "is" we don't want to prepend another "is". We need to make
sure that "is" or "has" is not the start of a longer word. So the next character has to
be title case. This ensures that a boolean field called hashCodeCalculated would get a
getter named isHashCodeCalculated instead of hasHCodeCalculated.
👤 reinierz 🕗 Jul 26, 2009 at 07:19 UTC
Implemented all suggested changes in commit a9d2989.
NB: Roel, I haven't tested all borderline cases on this one!
👤 reinierz 🕗 Jul 26, 2009 at 07:30 UTC
Test ﹟1: Make boolean fields named 'isFoo', 'getBar', 'hasBaz' and 'hashFlooble'. This must generate methods
'isFoo(), hasBaz, getBar, and isHashFlooble.
On eclipse: Correct on all counts.
On javac: Correct on all counts.
Test ﹟2: Make boolean fields named 'isFoo', 'bar'. Then make methods named 'hasFoo', and 'getBar', and make
sure that neither field gets an auto-generated getter, and that both fields get a warning that no getter is
being made, with the alternate name stated in the warning message.
on eclipse: correct on all counts.
on javac: correct on all counts.
Thus, I'm verifying the change.
End of migration
continue work on @Singular support
added validation of @Singular Field Type
added test class data from lombok project
added more validation for @Singular
improved delombok code generation for @Singular Builder (generic parameters)
improved delombok code generation for @Singular Builder (build Method and guava collections)
improved delombok code generation for @Singular Builder (build Method)