Bug 179011 - IType#getMethod(..) should not throw AFE when name contains dot
Summary: IType#getMethod(..) should not throw AFE when name contains dot
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M7   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 178190
  Show dependency tree
 
Reported: 2007-03-23 09:52 EDT by Markus Keller CLA
Modified: 2007-04-27 10:57 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (1.76 KB, patch)
2007-04-26 07:39 EDT, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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