Bug 97268 - [quick fix] "Create method" quick fix guesses wrong return type
Summary: [quick fix] "Create method" quick fix guesses wrong return type
Status: RESOLVED DUPLICATE of bug 69471
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-30 10:36 EDT by David Saff CLA
Modified: 2005-05-31 06:11 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Saff CLA 2005-05-30 10:36:25 EDT
Given code:

package dj.test;

import junit.framework.TestCase;

/**
 * @author avi
 */
public class CopyOfDjTests extends TestCase {
	public class Song {}

	public class Dj {}

	public void test00increasePlayCount() throws Exception {
		Dj dj = new Dj();
		Song song = new Song();
		assertEquals(0, dj.playCount(song));
	}
}

(With JUnit libraries imported).  The "create method" quick fix tries to
generate method "playCount" with return type "Object".  Originally, I blamed
autoboxing, but the same happens when 1.4 compliance is enabled.

The issue appears to be that assertEquals is overloaded in TestCase
Comment 1 Dirk Baeumer CLA 2005-05-31 06:08:38 EDT
For me not critical for 3.1.
Comment 2 Martin Aeschlimann CLA 2005-05-31 06:11:34 EDT

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