Bug 98483 - IMethodBinding.override does not compare method names
Summary: IMethodBinding.override does not compare method names
Status: CLOSED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 RC2   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 80919 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-06 06:04 EDT by Martin Aeschlimann CLA
Modified: 2005-06-10 11:17 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 Martin Aeschlimann CLA 2005-06-06 06:04:08 EDT
20050606

IMethodBinding.override has still major bugs, e.g. it claims that
public class A {
             String getDescription() {
             }
}

override Object.toString.
(Use the ASTView-comparison tray to test the method)

It seems that the method names are not compared.
Comment 1 Jerome Lanneluc CLA 2005-06-06 06:27:13 EDT
We strictly follow the spec (section 6.4.2 of JLS2) that doesn't take the
selector  into account. Now is this good or bad ? When renaming a method, a
client can currently know in advance if the renamed method will override another
method. Do we want to loose this capability ?
Comment 2 Martin Aeschlimann CLA 2005-06-06 06:37:16 EDT
oh, I see, in fact I didn't read section 6.4.2. The name 'overrides()' is a bit
misleading. Would be good if you can add an extra 'Caution!' to the Javadoc comment.

Ok to close.
Comment 3 Jerome Lanneluc CLA 2005-06-06 06:53:27 EDT
Forget comment #1. I was wrong. I re-read the spec and it talks about the method
name and signature for override. I'll fix the implementation.
Comment 4 Philipe Mulet CLA 2005-06-06 08:59:37 EDT
+1 for RC2
Comment 5 Jerome Lanneluc CLA 2005-06-06 09:03:04 EDT
Changed MethodBinding#overrides(...) to compare the selectors as well.
Added regression test CompatibilityRulesTests#test029().
Comment 6 Olivier Thomann CLA 2005-06-07 13:56:19 EDT
Verified in N20050606-0010 + JDT/Core HEAD
Comment 7 Jerome Lanneluc CLA 2005-06-10 04:42:26 EDT
*** Bug 80919 has been marked as a duplicate of this bug. ***
Comment 8 Frederic Fusier CLA 2005-06-10 11:17:45 EDT
Verified for 3.1 RC2 using build I20050610-0010