Bug 98483

Summary: IMethodBinding.override does not compare method names
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: markus.kell.r
Version: 3.1   
Target Milestone: 3.1 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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