Bug 209475 - BindingKey.isRawType() doesn't return the right result
Summary: BindingKey.isRawType() doesn't return the right result
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.4 M4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 209993
  Show dependency tree
 
Reported: 2007-11-12 06:38 EST by David Audel CLA
Modified: 2007-12-12 03:41 EST (History)
2 users (show)

See Also:


Attachments
Proposed fix and regression test (6.23 KB, patch)
2007-11-14 04:52 EST, Jerome Lanneluc 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 06:38:41 EST
build I20071107-1300

'new BindingKey("Ltest/ZZ<Ljava/lang/Object;>;").isRawType()' returns true but this is not the binding key of a raw type.


The problem is that the code of isRawType() is:
public boolean isRawType() {
  KeyKind kind = new KeyKind(this.key);
  kind.parse();
  return (kind.flags & KeyKind.F_RAW_TYPE) != 0;
}

The value of F_PARAMETERIZED_TYPE is 0x01000 and the value of F_RAW_TYPE  is 0x01001.
So '(kind.flags & KeyKind.F_RAW_TYPE) != 0' is true when kind.flags value is F_PARAMETERIZED_TYPE.
Comment 1 Jerome Lanneluc CLA 2007-11-14 04:52:55 EST
Created attachment 82854 [details]
Proposed fix and regression test
Comment 2 Jerome Lanneluc CLA 2007-11-15 11:59:17 EST
Fix and test released for 3.4M4
Comment 3 Maxime Daniel CLA 2007-12-12 03:41:22 EST
Verified for 3.4 M4 using build I20071211-0010.