Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350003 - [1.7] [compiler] AnnotationPolymorphicSignature tag is not being set to invokeExact while compiling MethodHandle source file
Summary: [1.7] [compiler] AnnotationPolymorphicSignature tag is not being set to invok...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7.1   Edit
Assignee: Satyam Kandula CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-22 02:35 EDT by Satyam Kandula CLA
Modified: 2011-08-05 02:54 EDT (History)
3 users (show)

See Also:
Olivier_Thomann: review+


Attachments
Proposed patch (2.20 KB, patch)
2011-06-22 02:49 EDT, Satyam Kandula CLA
no flags Details | Diff
Same patch with fixed typos (4.97 KB, patch)
2011-06-24 14:00 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Satyam Kandula CLA 2011-06-22 02:35:35 EDT
Generally the MethodHandle class file is used to resolve any calls to its classes, but there are occasions that the associated source file will be used during search. In these cases, I see that the AnnotationPolymorphicSignature tag is not being set.
Comment 1 Satyam Kandula CLA 2011-06-22 02:49:00 EDT
Created attachment 198371 [details]
Proposed patch

java.lang.invoke.MethodHandle.PolymorphicSignature is being searched for, while  java.lang.invoke.MethodHandle$PolymorphicSignature is getting passed for. I haven't removed the previous checks. 
Olivier, do you think java.lang.invoke.MethodHandle.PolymorphicSignature could be passed sometimes?
Comment 2 Olivier Thomann CLA 2011-06-24 13:55:30 EDT
Patch looks good. I'll attach a new one with typos fixed.
Could you please provide steps that is passing in the new code ?
Comment 3 Olivier Thomann CLA 2011-06-24 14:00:14 EDT
Created attachment 198562 [details]
Same patch with fixed typos
Comment 4 Olivier Thomann CLA 2011-06-24 14:00:53 EDT
Patch itself looks good, but I would like to see a test case that goes through that code.
Comment 5 Satyam Kandula CLA 2011-06-27 10:07:38 EDT
(In reply to comment #4)
Adding a test case seems to be difficult, will try!
Comment 6 Olivier Thomann CLA 2011-06-27 10:18:06 EDT
In this case, just describe the steps that led to this fix, please.
Thanks.
Comment 7 Satyam Kandula CLA 2011-06-28 12:08:38 EDT
Consistent way is to run this through debugger with a fresh workspace
1. Create a Java7 project with a jdk with sources.
2. Put a break point in ReferenceBinding#computeId() around the patch. 
3. Create a dummy class file and try to search for Method references to MethodHandle.invokeExact(). 
4. Breakpoint should be hit.
Comment 8 Satyam Kandula CLA 2011-06-28 12:10:07 EDT
Released the patch on BETA_JAVA7 branch
Comment 9 Curtis Windatt CLA 2011-07-20 17:31:58 EDT
Verified using the steps from comment #7.