Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 406982 - [1.8][compiler] Generation of MethodParameters Attribute in classfile
Summary: [1.8][compiler] Generation of MethodParameters Attribute in classfile
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: BETA J8   Edit
Assignee: Jesper Moller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 406966
  Show dependency tree
 
Reported: 2013-05-01 08:59 EDT by Jesper Moller CLA
Modified: 2013-09-05 18:56 EDT (History)
2 users (show)

See Also:
srikanth_sankaran: review+


Attachments
Patch for review for this issue (27.77 KB, patch)
2013-08-20 03:53 EDT, Jesper Moller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesper Moller CLA 2013-05-01 08:59:48 EDT
Generate the MethodParameters attribute into the attributes table of a method_info structure.
Comment 1 Jesper Moller CLA 2013-08-20 03:53:48 EDT
Created attachment 234562 [details]
Patch for review for this issue
Comment 2 Jesper Moller CLA 2013-08-20 03:54:37 EDT
Please consider this patch for review
Comment 3 Srikanth Sankaran CLA 2013-08-26 04:30:21 EDT
I'll review this one shortly. Thanks for your patience.
Comment 4 Srikanth Sankaran CLA 2013-08-26 07:18:40 EDT
(In reply to comment #2)
> Please consider this patch for review

Patch looks good. Released here: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=446bb541ca213992576e03757eea7f75301ac1be

Before we resolve this, a couple of things need addressing.

(1) Per my reading the enum valueOf method must have a mandated parameter
by name 'name' - this is presently missing.

(2) Let us also add a couple more tests with deeper levels of inner class
nesting and capture of outer locals from different contexts.

Thanks!
Comment 5 Jesper Moller CLA 2013-08-26 07:54:58 EDT
(In reply to comment #4)

> (1) Per my reading the enum valueOf method must have a mandated parameter
> by name 'name' - this is presently missing.

Good catch!

> (2) Let us also add a couple more tests with deeper levels of inner class
> nesting and capture of outer locals from different contexts.

Yes, but there's a a snag: See bug 415019 - there's some inconsistency with javac regarding local classes.
Comment 6 Srikanth Sankaran CLA 2013-08-26 23:17:23 EDT
Via http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=5a2c180a837c1c434b2700b180ba498a761566e7, I released some
more tests.

Please note that some of the tests are disabled because of known bugs
in ECJ and will have to enabled once fixes are available. A couple of
tests are disabled on account of spec wording confusion. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=415019#c5
Comment 7 Stephan Herrmann CLA 2013-08-27 04:23:40 EDT
Removing review flag since patch has already been reviewed by Srikanth
Comment 8 Jesper Moller CLA 2013-08-28 02:33:35 EDT
Released fixes for the issue with enum's valueOf and private nested classes's constructors.

Here it is:
http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=3001a2e9b40b82bc07cde07151a79e328e95bc31

Issue with anonymous classes under local classes still not resolved.
Comment 9 Jesper Moller CLA 2013-09-05 18:56:12 EDT
Released the fix for the remaining cases, via http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=dadef2fc0573a510ff313dd625ee1ba4e2b2e6e3