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 250865 - Change MIMELookup caching
Summary: Change MIMELookup caching
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.1
Hardware: PC Linux
: P1 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-03 12:17 UTC by Svata Dedic
Modified: 2015-03-06 11:14 UTC (History)
2 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
Proposed changes (23.97 KB, patch)
2015-03-03 12:17 UTC, Svata Dedic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Svata Dedic 2015-03-03 12:17:00 UTC
Created attachment 152361 [details]
Proposed changes

To support multiple execution contexts running in NetBeans I need for a project I need to change Lookup caching done in MimePath. MimePath instances are shared, created starting from static final MimePath.EMPTY instance. Now they cache their MimeLookups so an execution cannot obtain its own execution-specific MimeLookup; the MimeLookup impl cannot be plugged.

I propose to create a private API with a default implementation which works exactly the same as today for NetBeans. I can then implement other ways how to provide Lookup instances for MimePath depending on the context.

Please see the attahced diff.

During prototyping, I've noticed that the UpdatableProxyLookup is actually unused - no one called UpdatablePL.setLookups(); possibly a leftover from the past - I removed this extra layer.
Comment 1 Svata Dedic 2015-03-06 11:14:20 UTC
Commited as part of issue #250863