Bug 582496 - Incorrect Pointcut method identified when mutiple method name matches
Summary: Incorrect Pointcut method identified when mutiple method name matches
Status: CLOSED DUPLICATE of bug 88620
Alias: None
Product: AspectJ
Classification: Tools
Component: Runtime (show other bugs)
Version: 1.9.7   Edit
Hardware: PC Windows 11
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-30 04:08 EDT by Ranjit Gopinathan CLA
Modified: 2023-10-04 00:05 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ranjit Gopinathan CLA 2023-09-30 04:08:23 EDT
The method tryToDiscoverParameterNames() called from Java15ReflectionBasedReferenceTypeDelegate.getDeclaredPointcuts() fails to identify the correct pointcut method when multiple pointcut methods with same name/overloaded methods are declared.

Analysis

pnames = tryToDiscoverParameterNames(pcs[i]);

The method tryToDiscoverParameterNames() only compares the method names to get the parameter names through Java15AnnotationFinder.getParameterNames(). This results in incorrect identification of the pointcut method and the downstream logic fails to identify the parameters associated with the pointcut.


Usecase and analysis here : https://stackoverflow.com/questions/77205182/why-a-pointcut-name-method-cant-be-overloaded
Comment 1 Alexander Kriegisch CLA 2023-10-04 00:05:34 EDT
This is not a bug but a feature request. See discussion [1] and existing issue [2].

Please also do not create bugs here anymore. The Bugzilla instance is to be retired, and current AspectJ issues should go to [3].

[1] https://www.eclipse.org/lists/aspectj-dev/msg01383.html
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=88620
[3] https://github.com/eclipse-aspectj/aspectj/issues

*** This bug has been marked as a duplicate of bug 88620 ***