Skip to main content

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


Hi Matthew,

Please open separate bug reports for the issues you have found.  Thanks.

The first issue I'm inclined to make the default constructors private for the extending classes which directly reference the basefile field (ZipBundleFile, DirBundleFile etc.)

The second issue is not intentional.  We will need to investigate more to see what the issue is.

Tom





Matthew Webster <matthew_webster@xxxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx

05/25/2006 08:13 AM

Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>

To
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
cc
Subject
[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/
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


Back to the top