...
Code Block | ||
---|---|---|
| ||
SecurityManager sm = System.getSecurityManager();
if (sm != null) { // check whether file may be read
sm.checkRead("/local/schema.dtd");
}
|
Compliant Solution (checkPermission()
)
J2SE Java SE 1.2 added two methods — checkPermission(Permission perm)
and checkPermission(Permission perm, Object context)
— to the SecurityManager
class. The motivations for this change included
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="4d0d4b4fea5b7d16-d0187ff0-44ac43a5-a283b36f-5e724a4a9601d56ff9f190c7"><ac:plain-text-body><![CDATA[ | [[API 2006 | AA. Bibliography#API 06]] | ]]></ac:plain-text-body></ac:structured-macro> |
...