Summary: | [perf] BinaryMethod.getParameterNames does not follow IMethod API contract | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Dan Kehn <kehn> | ||||||
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | gmendel, Olivier_Thomann | ||||||
Version: | 3.0.1 | ||||||||
Target Milestone: | 3.2 M4 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 98154 | ||||||||
Attachments: |
|
Description
Dan Kehn
2005-02-08 18:26:00 EST
Note: The above data was collected with FileMon, available at http://www.sysinternals.com/ntw2k/source/filemon.shtml. It is a very easy to use utility for capturing I/O events. I see 2 ways to solve this problem: - Fix the spec to say that the attached source is used, and provide another method (e.g. getRawParameterNames()) that return the invented named for binary methods - Fix the implementation, and provide another method (e.g. getSourceParameterNames()) that return the names from the attached source Given the APIs docs., we will vote for the first option, as to not break those that are relying on the current implementation. We now calling this in a lazy manner, for which time we will always want the src. name. Jérôme, Now that bug 110173 is fixed, it would be possible to get the parameter names from the attached javadoc. I will attach a patch for this. Created attachment 29699 [details]
Proposed patch for parameter names from attached javadoc
Now we simply need to add the getRawParameterNames() throws JavaModelException
method and this PR can be closed.
Once this is done, let me know. I have some regression tests that could be enabled in the AttachedJavadocTests suite. Created attachment 29719 [details]
Proposed patch for parameter names from attached javadoc
I changed the API to reflect the fact that the naming starts at arg0 and not
arg1, when no name can be retrieved. This is the actual behavior.
Applied patch (thanks Olivier) and added IMethod#getRawParameterNames(). Added tests ClassFileTests#testParameterNames01/02 and testRawParameterNames01/02. Verified for 3.2 M4 using build I20051212-0010 |