Issue1495299
Created on 2006-05-26.03:29:52 by cgroves, last changed 2006-05-28.02:23:08 by cgroves.
msg2488 (view) |
Author: Charlie Groves (cgroves) |
Date: 2006-05-26.03:29:52 |
|
The classloader passed into PySystemState.initialize is
ignored by BytecodeLoader. This has bitten me twice.
First, if the Jython classes aren't on the default
system classpath but instead on the classpath passed
into initialize, Jython blows up while initializing.
Somewhere in creating its internal set of Python
exceptions it throws a NullPointerException. Second,
the java proxies don't see items in the classloader
passed into initialize. This got me when I had a
Jython class attempting to use ResourceBundle.getBundle
to retrieve a bundle only on the loader passed to
initialize. Since the bundle wasn't on the Jython
class loader, things blew up.
The attached patch fixes both of these issues by
creating the BytecodeLoader2 with the classloader
passed into initialize as its parent. The only
problems I can forsee with this is if someone passes in
a classloader to initialize that doesn't have the
default classloader as its parent and expects items on
the default loader to be available as they are now.
I'm not sure how likely this is since I'm not sure what
the current usage of the classloader parameter is.
|
msg2489 (view) |
Author: Charlie Groves (cgroves) |
Date: 2006-05-28.02:23:08 |
|
Logged In: YES
user_id=1174327
On further review, this patch does nothing to address the
first issue I mentioned. However it does handle the second
problem where a user expects the classloader of the Jython
proxy classes to have the classloader passed into initialize
as a parent.
|
|
Date |
User |
Action |
Args |
2006-05-26 03:29:52 | cgroves | create | |
|