[kaffe] VMSecurityManager.getClassContext() fixlet

Mark Wielaard mark at klomp.org
Sun Dec 5 03:50:19 PST 2004


ResourceBundle doesn't work correctly anymore when getBundle() is called
from a user defined class loader Class. This is because
VMSecurityManager.getClassContext() doesn't obey its interface:
"Hint: you may need to pop off one or more frames: don't include
SecurityManager or VMSecurityManager.getClassContext in your result. " 

This patch fixes that:

2004-12-05  Mark Wielaard  <mark at klomp.org>

	* libraries/javalib/java/lang/ClassLoader.java
	(setSigners): Don't throw Exception.
	* libraries/javalib/java/lang/VMSecurityManager.java
	(getClassContext): Cleanup returned stack.

This isn't the most efficient way to handle this for ResourceBundle. We
should probably introduce a VMResourceBundle that gives kaffe the option
to do it the efficient way as Helmer once introduced. But this patch
also fixes other potential bugs in the use of the SecurityManager
getClassContext() method.

It also tries to sneak in the patch to make ClassLoader.setSigners() not
throw exceptions for anything that uses signed jar files (Casey his
patch is way better, but I want to get at least something in to make
kaffe CVS usable again.)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: stack.patch
Type: text/x-patch
Size: 1715 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20041205/fc3e2662/attachment-0006.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://kaffe.org/pipermail/kaffe/attachments/20041205/fc3e2662/attachment-0002.pgp 

More information about the kaffe mailing list