[PATCH] SecurityManager compatibility patch

Edouard G. Parmelan egp at free.fr
Tue Aug 28 07:42:34 PDT 2001

On Thu, Aug 02, 2001 at 12:37:20 +0300, Jukka Santala wrote:

> This is a fairly straightforward patch to make the default SecurityManager
> returned through System.getSecurityManager() to == null. This is
> apparently the correct behaviour for compliant classlibs; SecurityManager
> is only set by default for applets, and some Java programs will think
> they're being ran as applets if they find SecurityManager set, acting
> weirdly or refusing to run altogether.

Thanks, applied.

> Kaffe's NullSecurityManager permits everything anyway, this makes no
> change in security semantics, but allows stuff like JMF 2.1.1 to at least
> run. The only non-straightforward change is the mechanism in
> Class.getStackClass(), since it's not apparent what should happen if
> SecurityManager isn't set. This patch follows the prior behaviour, and
> calls defaultSecurityManager's method.

I remove completly NullSecurityManager and change Class.getStackClass() to
direct call static package method SecurityManager.getContextClass0().
Edouard G. Parmelan

More information about the kaffe mailing list