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.
Summary: | Allow access to the system Lookup | ||
---|---|---|---|
Product: | platform | Reporter: | Svata Dedic <sdedic> |
Component: | Lookup | Assignee: | Jaroslav Havlin <jhavlin> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ralphbenjamin |
Priority: | P1 | ||
Version: | 8.1 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | TASK | Exception Reporter: | |
Bug Depends on: | 250691 | ||
Bug Blocks: | 250863 | ||
Attachments: |
Proposed patch
refined patch - javadoc added |
Looks like a simple change i am able to understand. Can you just note the fact about the global lookup in javadoc for Lookups.executeWith? Created attachment 152386 [details]
refined patch - javadoc added
OV-1 (javadoc) added.
I agree with patch. The patch seems fine to me. ... i agree, too Will be implemented in jet-main#74aad6bdd167. Testcase added as jet-main#749204d0e21f Integrated into 'main-silver', will be available in build *201503070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/74aad6bdd167 User: Svata Dedic <sdedic@netbeans.org> Log: #250873: Lookups.executeWith() behaviour defined for null argument |
Created attachment 152373 [details] Proposed patch It's impossible to reach the Only Global Default Lookup during Lookups.executeWith - in case one really needs to be independent of context switches. I propose a slight change to the Lookups.executeWith - see the attached patch. The system would remember the default Lookup, then use it whenever Lookup.executeWith() is called with null argument - the behaviour for such situation is currently undefined and would result in a NPE.