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 128229 - Generification of ContextProvider
Summary: Generification of ContextProvider
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: apireviews
Depends on:
Reported: 2008-02-23 18:12 UTC by Jesse Glick
Modified: 2010-04-29 09:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

Proposed patch (188.02 KB, patch)
2008-02-23 19:14 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2008-02-23 18:12:09 UTC
As seen by the fix in #3f95d8ec59de, the current Debugger Core API does not do a good job of preventing type errors in
Lookup. The interface lacks the correct generic signature, and the implementation does insufficient runtime type checking.

Also there is an interface ContextProvider which surely ought to be implemented by all the API classes which provide
that signature, yet currently only Lookup actually implements it.
Comment 1 Jesse Glick 2008-02-23 19:14:00 UTC
Created attachment 57139 [details]
Proposed patch
Comment 2 Jesse Glick 2008-03-01 19:40:14 UTC
Comment 3 Jesse Glick 2008-03-02 14:18:59 UTC
I found I also needed to add a method DebuggerManager.join to merge two context providers. Formerly this was done with a
copied and pasted block of code everywhere which appended one list to the other. Since the lists are now List<? extends
T>, it is impermissible to destructively insert the second into the first. And furthermore it seems that the actual List
returned was in fact a java.beans.Customizer (though this was nowhere documented) and code relied on this. The new
method takes care of these details and makes the code shorter too. #00a4dfe6689f
Comment 4 Quality Engineering 2010-04-29 09:38:11 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.