[ 
https://issues.apache.org/jira/browse/OPENJPA-2993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18111066#comment-18111066
 ] 

ASF subversion and git services commented on OPENJPA-2993:
----------------------------------------------------------

Commit 59580b33c5067ce7f8128281078c370d5ec67453 in openjpa's branch 
refs/heads/master from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=59580b33c ]

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

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. 68671e667 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.


> Renamed getaXxx accessors drop JavaBeans naming coverage
> --------------------------------------------------------
>
>                 Key: OPENJPA-2993
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2993
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 4.2.0
>            Reporter: Maxim Solodovnik
>            Priority: Major
>             Fix For: 4.2.0
>
>
> Discussion thread: 
> https://github.com/apache/openjpa/pull/144#discussion_r3683007048
> **(medium)** The accessors were renamed from the JavaBeans-Introspector style 
> (getaCAPITAL/getaWord/isaBoolean for fields aCAPITAL/aWord/aBoolean) to 
> getACAPITAL/getAWord/isABoolean. This test existed precisely to cover the 
> former naming, so property-access entities using IDE-generated getaXxx 
> accessors would silently stop being recognized. Did 3.2 change property-name 
> resolution, or is this adapting the test to a regression? Could both variants 
> stay covered?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to