Bug 209479

Summary: infinite loop in BindingKey when signatures are invalid
Product: [Eclipse Project] JDT Reporter: David Audel <david_audel>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: darin.eclipse, Olivier_Thomann
Version: 3.3   
Target Milestone: 3.6 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix + regression test none

Description David Audel CLA 2007-11-12 07:13:07 EST
build I20071107-1300

1) checkout org.eclipse.jdt.core
2) create a scrapbook page in org.eclipse.jdt.core
3) type this code is the scrapbook page
new org.eclipse.jdt.core.BindingKey("Ltest/ZZ<Ljava/lang/Object>;").isRawType();
4) select the code and do ctrl+shift+D (Display)
The evaluation never finish

If you type
new org.eclipse.jdt.core.BindingKey("Ltest/ZZ<Ljava/lang/Object;>;").isRawType();
then the evaluation finish correctly.
Comment 1 Darin Wright CLA 2009-06-05 13:38:50 EDT
This looks like a JCore bug. A main type with the expression also fails to complete. Perhaps the BindingKeyParser is not expecting invalid syntax?
Comment 2 Olivier Thomann CLA 2010-03-17 11:48:28 EDT
There is no specified behavior when the given key is invalid. So I guess in this case, the evaluation should just return false.
Comment 3 Olivier Thomann CLA 2010-03-18 11:35:46 EDT
Created attachment 162425 [details]
Proposed fix + regression test
Comment 4 Olivier Thomann CLA 2010-03-18 12:24:11 EDT
Released for 3.6M7.
Regression test added in:
org.eclipse.jdt.core.tests.model.BindingKeyTests#test055
Comment 5 Frederic Fusier CLA 2010-04-26 13:00:58 EDT
Verified for 3.6M7 using I20100425-2000.