This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 25166 - ClassCastException in nameIsValid() and findElementsByTypeExtended
Summary: ClassCastException in nameIsValid() and findElementsByTypeExtended
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Martin Matula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-26 07:45 UTC by _ briansmith
Modified: 2002-07-19 15:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch (7.55 KB, patch)
2002-06-26 07:46 UTC, _ briansmith
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ briansmith 2002-06-26 07:45:34 UTC
Calling either of these methods will nearly always
result in a ClassCastException. The reason is that
they expect extendedNamespace() to return a
collection of ModelElement instances, but actually
it returns a collection of StorableFeatureds.

Here is a patch. Note that in the process I
refactored nameIsValid() and
lookupElementExtended() to use a common helper
method for the search algorithm they share. This
way, nameIsValid() can take advantage of the index
that was previously only being used by
lookupElementExtended.
Comment 1 _ briansmith 2002-06-26 07:46:03 UTC
Created attachment 6424 [details]
Patch
Comment 2 Martin Matula 2002-06-30 22:46:12 UTC
patch integrated