< prev index next >

src/java.base/share/classes/java/security/PrivilegedActionException.java

Print this page




  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.security;
  27 
  28 import java.io.IOException;
  29 import java.io.ObjectInputStream;
  30 import java.io.ObjectOutputStream;
  31 import java.io.ObjectStreamField;
  32 import jdk.internal.misc.SharedSecrets;
  33 
  34 /**
  35  * This exception is thrown by
  36  * {@code doPrivileged(PrivilegedExceptionAction)} and
  37  * {@code doPrivileged(PrivilegedExceptionAction,
  38  * AccessControlContext context)} to indicate
  39  * that the action being performed threw a checked exception.  The exception
  40  * thrown by the action can be obtained by calling the
  41  * {@code getException} method.  In effect, an
  42  * {@code PrivilegedActionException} is a "wrapper"
  43  * for an exception thrown by a privileged action.
  44  *
  45  * <p>As of release 1.4, this exception has been retrofitted to conform to
  46  * the general purpose exception-chaining mechanism.  The "exception thrown
  47  * by the privileged computation" that is provided at construction time and
  48  * accessed via the {@link #getException()} method is now known as the
  49  * <i>cause</i>, and may be accessed via the {@link Throwable#getCause()}
  50  * method, as well as the aforementioned "legacy method."
  51  *
  52  * @since 1.2




  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.security;
  27 
  28 import java.io.IOException;
  29 import java.io.ObjectInputStream;
  30 import java.io.ObjectOutputStream;
  31 import java.io.ObjectStreamField;
  32 import jdk.internal.access.SharedSecrets;
  33 
  34 /**
  35  * This exception is thrown by
  36  * {@code doPrivileged(PrivilegedExceptionAction)} and
  37  * {@code doPrivileged(PrivilegedExceptionAction,
  38  * AccessControlContext context)} to indicate
  39  * that the action being performed threw a checked exception.  The exception
  40  * thrown by the action can be obtained by calling the
  41  * {@code getException} method.  In effect, an
  42  * {@code PrivilegedActionException} is a "wrapper"
  43  * for an exception thrown by a privileged action.
  44  *
  45  * <p>As of release 1.4, this exception has been retrofitted to conform to
  46  * the general purpose exception-chaining mechanism.  The "exception thrown
  47  * by the privileged computation" that is provided at construction time and
  48  * accessed via the {@link #getException()} method is now known as the
  49  * <i>cause</i>, and may be accessed via the {@link Throwable#getCause()}
  50  * method, as well as the aforementioned "legacy method."
  51  *
  52  * @since 1.2


< prev index next >