posted 20 years ago
I have a few questions:
When I call AccessController.checkPermission for the first time, it calls
Policy.getPermissions(CodeSource). This then returns a permission
collection for the codesource (essentially a protection domain).
1. Since the classloaders set the protectiondomain for classes, is this
essentially a guaranteed "override"?
2. This is only called the first time. How would I make it consult the
policy every time, or is that impossible?
3. Will it always call "Policy.getPermissions(..)" the first time? Or is
this only done when no AccessControlContext is passed in? Or is it only
when no non-null ProtectionDomain was set by the classloader?
Why is it so all over the place? There's about 5 different places where
permissions are set for everything, and they it's not clear what overrides
what? What was the thinking behind this?