Bug 197569 - [assist] Default proposal clone() method on array reports to belong to primitive
Summary: [assist] Default proposal clone() method on array reports to belong to primitive
Status: CLOSED DUPLICATE of bug 473101
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 3.4 M1   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-23 21:52 EDT by Evan O'Dorney CLA
Modified: 2015-07-22 04:09 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evan O'Dorney CLA 2007-07-23 21:52:51 EDT
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[]
Comment 1 David Audel CLA 2007-07-26 07:18:22 EDT
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.
Comment 2 Frederic Fusier CLA 2007-12-20 06:43:46 EST
Verified for 3.4M1
Comment 3 Dani Megert CLA 2015-07-22 04:09:30 EDT
.

*** This bug has been marked as a duplicate of bug 473101 ***