Bug 179011

Summary: IType#getMethod(..) should not throw AFE when name contains dot
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jerome_lanneluc
Version: 3.3   
Target Milestone: 3.3 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 178190    
Attachments:
Description Flags
Proposed patch none

Description Markus Keller CLA 2007-03-23 09:52:57 EDT
I20070322-1800

IType#getMethod(..) should not throw an AFE when the method name contains a dot. It should just create a method handle for a method that does not exist.

From bug 178190:

org.eclipse.core.runtime.AssertionFailedException: assertion failed: 
        at org.eclipse.core.runtime.Assert.isTrue(Assert.java:109)
        at org.eclipse.core.runtime.Assert.isTrue(Assert.java:95)
        at
org.eclipse.jdt.internal.core.SourceMethod.<init>(SourceMethod.java:34)
        at
org.eclipse.jdt.internal.core.SourceType.getMethod(SourceType.java:368)

Same problem with BinaryMethod.
Comment 1 Markus Keller CLA 2007-04-17 13:43:18 EDT
I think you should just remove the assertions. They're not spec'd, and removing them would allow our friends in bug 178190 to rerun JUnit tests more easily.
Comment 2 Frederic Fusier CLA 2007-04-25 16:59:28 EDT
The fix is trivial and I agree that the assertion is not spec'd anywhere.
Would you agree on this change for M7?
Comment 3 Jerome Lanneluc CLA 2007-04-26 04:26:50 EDT
(In reply to comment #2)
> The fix is trivial and I agree that the assertion is not spec'd anywhere.
> Would you agree on this change for M7?
ok for this change

Comment 4 Frederic Fusier CLA 2007-04-26 07:39:40 EDT
Created attachment 65009 [details]
Proposed patch
Comment 5 Frederic Fusier CLA 2007-04-26 09:20:20 EDT
Released for 3.3 M7 in HEAD stream.
Comment 6 James Synge CLA 2007-04-26 10:02:34 EDT
Thanks for fixing this promptly!
Comment 7 Jerome Lanneluc CLA 2007-04-27 10:57:35 EDT
Verified for 3.3M7 by looking at the code of v_751