JDK-8006896 : ClassReader doesn't see MethodParameters attr for method of anon inner class
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javac
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-01-24
  • Updated: 2013-02-22
  • Resolved: 2013-02-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b78Fixed
Description
Although a MethodParameters attribute is present in the classfile,
it's not visible through the language model.

The problem is illustrated by the attached jtreg test case.

Note: this is not a real test (it passed:-). Also, the code uses some bad coding practices. The problem is evidenced in the output, so run jtreg in verbose mode.



Comments
Verified that this is fixed
13-02-2013

The apparrent cause is that MethodSymbol discards the saved parameter names if the list doesn't match the size of the number of parameters in the type. Since javac doesn't currently output synthesized parameters, this will result the list not being the right size.
30-01-2013