Bug 36307 - JDK1.4.2: Wrong declaring class for clone method on array class
Summary: JDK1.4.2: Wrong declaring class for clone method on array class
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 37548 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-04-09 14:12 EDT by Olivier Thomann CLA
Modified: 2003-06-05 10:23 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 Olivier Thomann CLA 2003-04-09 14:12:21 EDT
Using 2.1:

Test case:

public class TestCase {

	public static void main(String[] args) {
	    args.clone();
	}
}

We generate wrong bytecodes:
public static void main(String[] args);
/*  Method descriptor  #15 ([Ljava/lang/String;)V */
Code attribute:
/* Stack: 1, Locals: 1 */
0	aload_0
1	invokevirtual #19 <Method java.lang.Object#clone() java.lang.Object>
4	pop
5	return

Jikes 1.18 produces the right bytecodes:

0	aload_0
1	invokevirtual #12 <Method [Ljava.lang.String;#clone() java.lang.Object>
4	pop
5	return

For more information, please refer to this bug report:
http://developer.java.sun.com/developer/bugParade/bugs/4329886.html
Comment 1 Philipe Mulet CLA 2003-05-21 07:20:51 EDT
Fixed when targeting 1.4 JRE.
Comment 2 Philipe Mulet CLA 2003-05-21 07:27:05 EDT
*** Bug 37548 has been marked as a duplicate of this bug. ***
Comment 3 David Audel CLA 2003-06-05 10:23:04 EDT
Verified