Versions Compared

Key

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

...

The previous compliant solution logs the exception instead of letting a FileNotFoundException propagate to a caller, in compliance with rule EXC06ERR01-J. Do not allow exceptions to transmit expose sensitive information.

But if none of the possible exceptions reveals sensitive information, we can use an equivalent mechanism that allows exceptions to be wrapped, consequently providing better diagnostic information for the caller. For example, an applet that lacks read-access to system files that contain fonts can accomplish the task from a privileged block without revealing any sensitive information. When non-sensitive exceptions provide more information, the client is better able to recognize the symptoms of a read failure.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e51479d254a01678-1268205a-43ac4f4c-bb96a4a0-d2f9204edfdff1438c29e72e"><ac:plain-text-body><![CDATA[

[[API 2006

AA. Bibliography#API 06]]

[method doPrivileged()

http://java.sun.com/javase/6/docs/api/java/security/AccessController.html#doPrivileged(java.security.PrivilegedAction)]

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="38d56e4902f27a48-8fa94e27-4fd54e70-ba9b8e97-cf23fb006ce3534cf4474f69"><ac:plain-text-body><![CDATA[

[[Gong 2003

AA. Bibliography#Gong 03]]

Sections 6.4, AccessController and 9.5 Privileged Code

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

...