[OPENJPA-2993] Recognise is<lowercase>() boolean getters again - #173
Open
rzo1 wants to merge 1 commit into
Open
Conversation
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.
solomax
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To answer the review question: 3.2 did not change property-name resolution — the test was adapting to a regression this PR introduced.
d488eab97required an upper-case character after theget/is/setprefix, which made the JavaBeans-stylegetaWord()/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 offisNormalGetterandisSetter, but missed the identical one inisBooleanGetter. 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— sogetaWord()andgetAWord()have always resolved to the same property. What changes is only that an entity whose boolean property is spelledisaXxx()is recognised again, as it was in 4.1.x.PropertyAccessCapitalizationgoes back to the spelling it was written for, so it andPropertyAccessCapitalizationOldBehavioronce more cover the two spellings instead of the same one twice.TestAccessorNameDerivationpins the rule itself, without needing a database.