[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-751) Hibernate reports erroneous "possible typo error" for properties with protected accessor methods

Stephen R. Saucier (JIRA) noreply at atlassian.com
Tue Feb 3 12:40:38 EST 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32289#action_32289 ] 

Stephen R. Saucier commented on ANN-751:
----------------------------------------

This issue is still present in 3.4.0.GA.

> Hibernate reports erroneous "possible typo error" for properties with protected accessor methods
> ------------------------------------------------------------------------------------------------
>
>                 Key: ANN-751
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-751
>             Project: Hibernate Annotations
>          Issue Type: Improvement
>    Affects Versions: 3.3.0.ga
>            Reporter: Stephen R. Saucier
>            Priority: Minor
>         Attachments: checkForOrphanProperties.patch
>
>
> According to the EJB3 spec, section 2.1.1 (Persistent Fields and Properties), "property accessor methods must be public or protected." However, the checkForOrphanProperties method of org.hibernate.cfg.annotations.reflection.EJB3OverridenAnnotationReader only looks for public methods (by virtue of the fact that it is using the getMethods method of Class. I believe that the checkForOrphanProperties method ought to look at the protected methods implemented in the entity class as well in order to eliminate the erroneous warning messages that are reported when using hibernate with protected property accessor methods.
> I've attached a patch which implements this additional behavior.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list