Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 499388

Summary: MatchLocator.createBinaryMethodHandle returns null for methods with synthetic arguments
Product: [Eclipse Project] JDT Reporter: Stefan Xenos <sxenos>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 4.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Stefan Xenos CLA 2016-08-08 18:53:09 EDT
I was investigating a test failure in the newindex branch when I encountered this bug in MatchLocator.

The bug:

MatchLocator sometimes compares "argumentTypeNames" against the generic signature (which is optional and doesn't include synthetic arguments), and sometimes compares it against the method descriptor (which always includes the synthetic arguments).

That means that the method returns a different result based on whether or not the generic signature is present.

One of the callers, MatchLocator.createHandle, always includes the synthetic arguments when it calls createBinaryMethodHandle. That means that, at least for that caller, it would be correct to always use the method descriptor rather than the generic signature.

I discovered this by including generic signatures in the .class files used by JavaSearchBugsTest.testBug123679. Presumably this failure means that some JDT search results will be omitted when searching for references to the constructors of inner classes when those constructors make use of generics.
Comment 1 Eclipse Genie CLA 2020-05-11 17:10:50 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.