Bug 209479 - infinite loop in BindingKey when signatures are invalid
Summary: infinite loop in BindingKey when signatures are invalid
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.6 M7   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-12 07:13 EST by David Audel CLA
Modified: 2010-04-26 13:00 EDT (History)
2 users (show)

See Also:


Attachments
Proposed fix + regression test (8.70 KB, patch)
2010-03-18 11:35 EDT, Olivier Thomann CLA
no flags Details | Diff

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