Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ccccff
protected PermissionCollection getPermissions(CodeSource cs) {
  PermissionCollection pc = super.getPermissions(cs);
  pc.add(new RuntimePermission("exitVM"));   // allow exit from the VM anytime
  return pc;
}

Exceptions

SEC11-EX0: Classes that directly subclass ClassLoader itself need not define getPermissions(), as ClassLoader does not define this method. This rule applies only to classloader that subclass SecureClassLoader or any of its subclasses.

Risk Assessment

Failure to consult the default system policy while defining a custom classloader violates the tenets of defensive programming and can result in classes defined with unintended permissions.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="26a9b7b570c66f6a-c5bcfe19-44cc48ba-8c4e8c3b-8d2cd77983b2a9abe28eabf4"><ac:plain-text-body><![CDATA[

[[API 2006

AA. Bibliography#API 06]]

[Class ClassLoader

http://java.sun.com/javase/6/docs/api/java/lang/ClassLoader.html]

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="66ebb7304c9c1993-3b1a3372-4ddc4e62-94d581f5-f79405b16de53e162e34b0a4"><ac:plain-text-body><![CDATA[

[[Oaks 2001

AA. Bibliography#Oaks 01]]

 

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="0b0292560536dbe6-9d300af4-4e6b484f-9a0fb6fe-de492c9e94539ac640b55802"><ac:plain-text-body><![CDATA[

[[Security 2006

AA. Bibliography#Security 06]]

 

]]></ac:plain-text-body></ac:structured-macro>

...