Skip to content

[OPENJPA-2993] Recognise is<lowercase>() boolean getters again - #173

Open
rzo1 wants to merge 1 commit into
masterfrom
OPENJPA-2993
Open

[OPENJPA-2993] Recognise is<lowercase>() boolean getters again#173
rzo1 wants to merge 1 commit into
masterfrom
OPENJPA-2993

Conversation

@rzo1

@rzo1 rzo1 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

To answer the review question: 3.2 did not change property-name resolution — the test was adapting to a regression this PR introduced. d488eab97 required an upper-case character after the get/is/set prefix, which made the JavaBeans-style getaWord()/setaWord()/isaBoolean() accessors stop being accessors: the property vanished with no error and no warning, and the next day the test entity was renamed to make the test green.

68671e667, titled "Support lowercase property names after get/set prefix", already took that requirement off isNormalGetter and isSetter, but missed the identical one in isBooleanGetter. This removes it there too, so all three agree.

No property or column names change: OpenJPA lower-cases the first character after the prefix unconditionally — deliberately unlike Introspector.decapitalize — so getaWord() and getAWord() have always resolved to the same property. What changes is only that an entity whose boolean property is spelled isaXxx() is recognised again, as it was in 4.1.x.

PropertyAccessCapitalization goes back to the spelling it was written for, so it and PropertyAccessCapitalizationOldBehavior once more cover the two spellings instead of the same one twice. TestAccessorNameDerivation pins the rule itself, without needing a database.

PR #144 required the character after the get/is/set prefix to be upper
case, which made the JavaBeans style getaWord()/setaWord()/isaBoolean()
accessors stop being accessors: the property vanished with no error and no
warning. 68671e6 took that requirement off isNormalGetter and isSetter
again, under the title "Support lowercase property names after get/set
prefix", but missed the identical one in isBooleanGetter. This removes it
there too, so all three agree.

No property or column name changes: OpenJPA lower-cases the first
character after the prefix unconditionally, so getaWord() and getAWord()
have always resolved to the same property. What changes is only that an
entity whose boolean property is spelled isaXxx() is recognised again, as
it was in 4.1.x.

PropertyAccessCapitalization goes back to the JavaBeans spelling it was
written for, so it and PropertyAccessCapitalizationOldBehavior once more
cover the two spellings rather than the same one twice.
TestAccessorNameDerivation pins the derivation rule itself, including its
deliberate divergence from Introspector.decapitalize, without needing a
database.
@rzo1 rzo1 self-assigned this Sep 2, 2026
@rzo1
rzo1 requested review from cristof and solomax September 2, 2026 18:08
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