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

Mark Struberg commented on OPENJPA-2197:
----------------------------------------

We should check this in any case. I assumed that this will be checked already. 
Can you quickly change the test and verify if it fails with a message if you 
try to apply a lifecycle callback on another method?

I went for fixing the Comparator as I didn't like to change the whole logic of 
this part. Of course, if there are other open tasks in this area, then we might 
think about doing a clean rework...
                
> MethodComparator in AnnotationPersistenceMetaDataParser should also compare 
> parameters
> --------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-2197
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2197
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 2.2.0
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>             Fix For: 2.3.0
>
>         Attachments: OPENJPA-2197_test.patch
>
>
> AnnotationPersistenceMetaDataParser contains a MethodComparator which only 
> compares the class + the method name. Too bad I have (had...) 2 methods with 
> the same name in my EntityListener:
>     @PreUpdate
>     public void updateChangeLog(Object entity) { ..
> and also
>     private void updateChangeLog(BaseEntity he, ChangeLogEntry cle)
> which is a private helper method.
> Due to the bug in MethodComparator, my @PreUpdate sometimes didn't get 
> detected.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to