Bug 99006 - Incorrect warning when a non-varargs method overrides a varargs method.
Summary: Incorrect warning when a non-varargs method overrides a varargs method.
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 trivial (vote)
Target Milestone: 3.2 M5   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-08 13:11 EDT by David Gates CLA
Modified: 2006-02-14 10:31 EST (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 Gates CLA 2005-06-08 13:11:03 EDT
Found in Eclipse 3.1 RC1.

Example:
interface Foo {
	void baz(Object... args);
}

interface Bar extends Foo {
	void baz(Object[] args); //Warning: "Varargs methods should only override 
other varargs methods unlike Bar.baz(Object[]) and Foo.baz(Object...)"
}

The varargs method is not overriding, but being overridden.
Comment 1 Kent Johnson CLA 2006-02-08 16:08:21 EST
Changed message to 'Varargs methods should only override or be overridden by other varargs methods unlike...'

Fixed up VarargsTest test11
Comment 2 David Audel CLA 2006-02-14 10:31:31 EST
Verified for 3.2 M5 using build I20060214-0010