Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] BundleFileWrapperFactoryHook


I have encountered a couple of nasty gotchas using wrapBundleFile():
1. BundleFile subclasses do not use getBaseFile() but use the protected basefile field instead. I got an NPE because my wrapping BundleFile subclass used the default constructor. Could the default constructor be made private to avoid this pitfall?
2. Worse is NestedDirBundleFile which is not wrappable. Is this an oversight or deliberate? It's very important that my wrapped bundle file handles getEntry() and getResourceURL() differently: the first I override to find cached classes the second I delegate to ensure ClassLoader.getResourceAsStream() works correctly (and does not look in the cache).

Thanks

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx

http://w3.hursley.ibm.com/~websterm/

Back to the top