Summary: | ASTParser.createBindings() returns [null] | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Genady Beryozkin <eclipse> | ||||||||||||
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> | ||||||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||||||
Severity: | normal | ||||||||||||||
Priority: | P3 | CC: | daniel_megert, david_audel, eric_jodet, frederic_fusier, Olivier_Thomann, philippe_mulet | ||||||||||||
Version: | 3.4 | Flags: | philippe_mulet:
pmc_approved+
|
||||||||||||
Target Milestone: | 3.3.2 | ||||||||||||||
Hardware: | PC | ||||||||||||||
OS: | Windows XP | ||||||||||||||
Whiteboard: | |||||||||||||||
Attachments: |
|
Description
Genady Beryozkin
2007-10-09 15:32:42 EDT
I'll investigate. The problem comes from the fact that the binding key parser tries to parse the key of the binary field as a resolved key. It expects to find the return type before the field name. Since the name starts with a 'L', it considers the key to be a malformed key. Jérôme, I'll add a regression test for it (disabled for now). I'll attach a patch to be reviewed. Created attachment 80053 [details]
Proposed fix
Regression tests are coming next.
Jérôme, please review it. Looking at the code it looks like the first letter of each base type was covered by a check that is not done in the case of 'L'.
I simply added the same check there.
Now this case passes as well as all existing tests in the ASTModelBridgeTests.
Created attachment 80056 [details]
Regression tests
Two regression tests. One for PAGE_AXIS field and one for LINE_AXIS field.
The first one should also pass without the fix, but the second would fail.
Created attachment 80074 [details]
New regression tests
I changed the regression tests to include a test that is using a field name starting with 'T'. This covers the two cases for the patch.
Created attachment 80430 [details]
Simplified tests
Same tests but simplified (only 1 assert per test) and with more comments.
Created attachment 80562 [details]
Tests that don't depend on jclMin15.jar content
Fix and tests released for 3.4M3 Fix and tests released for 3.3.2 Verified for 3.4M3 using I20071029-0010 build. Returning null can lead to NullPointerExceptions. This fix needs to be included in 3.3.2. Philippe please approve. +1 for 3.3.2 Verified for 3.3.2 using M20080123-0800 build |