Bug 440344 - [1.8][dom] Method binding of clone() of an array type in method references
Summary: [1.8][dom] Method binding of clone() of an array type in method references
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jay Arthanareeswaran CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks: 428741
  Show dependency tree
 
Reported: 2014-07-24 09:01 EDT by Noopur Gupta CLA
Modified: 2022-07-13 05:46 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Noopur Gupta CLA 2014-07-24 09:01:14 EDT
Function<int[], int[]> m1 = int[]::clone; 

The method binding for #clone in TypeMethodReference in the above example is a synthetic method binding (with private static modifiers) which is not helpful to the clients.

The method binding for #clone resolves to Object#clone() in MethodInvocation in the following example:
int[] ints = new int[] {1, 2, 3};
ints.clone();

Also see bug 333665, which says that the binding should be targeted to the Array implementation of clone().

For now, the bindings for MethodReferences to clone() of an array type should also resolve to Object#clone(), like in MethodInvocations.

Once bug 333665 is fixed, bindings for MethodReferences and MethodInvocations should point to the array type's variant of clone().
Comment 1 Markus Keller CLA 2014-10-27 12:48:36 EDT
(In reply to Noopur Gupta from comment #0)
> a synthetic method binding (with private static modifiers)

Same problem as bug 429813: The DOM bindings should not contain the generated helper method but the actually referenced method.
Comment 2 Jay Arthanareeswaran CLA 2015-05-12 04:01:54 EDT
No progress on this. Moving out to 4.6.
Comment 3 Jay Arthanareeswaran CLA 2016-04-05 04:33:23 EDT
No progress yet and unlikely to get time during 4.6. Moving out.
Comment 4 Manoj N Palat CLA 2018-05-21 06:06:59 EDT
Bulk move out of 4.8
Comment 5 Eclipse Genie CLA 2020-06-27 16:51:49 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.

If you have further information on the current state of the bug, please add it. 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.
Comment 6 Eclipse Genie CLA 2022-07-13 05:46:43 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.

If you have further information on the current state of the bug, please add it. 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.