| Summary: | [assist] Default proposal clone() method on array reports to belong to primitive | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Evan O'Dorney <Emo916math> |
| Component: | Core | Assignee: | David Audel <david_audel> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | daniel_megert |
| Version: | 3.3 | ||
| Target Milestone: | 3.4 M1 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
public class Test {
{
int[] a = new int[]{1};
int[] b = a.clone();
a.clone()[0] = 0;
}
}
This example is valid so the proposal of 'clone() int[] - int' is valid.
I close this bug as INVALID.
Verified for 3.4M1 . *** This bug has been marked as a duplicate of bug 473101 *** |
I am running Eclipse Europa on Gentoo Linux and have installed only PMD and the Europa Discovery Site onto my Eclipse system. When I type class A { int[] a; // analogous problems with float[], Object[] or int[][] a. a proposal window pops up. The problem line is: clone() int[] - int You can't clone an int. clone() should be a method of class int[]