Examples of PEAThrowingUncheckedEx


Examples of com.sun.jini.test.spec.security.util.PEAThrowingUncheckedEx

        }

        // PASS
        logger.fine("Privileges are enabled inside 'doPrivileged' "
                + "method as expected.");
        final PEAThrowingUncheckedEx peaEx2 =
                new PEAThrowingUncheckedEx(perm);

        try {
            callDoPrivileged(peaEx2);

            // FAIL
            throw new TestException(
                    "Method did not throw any exception while "
                    + "RuntimeException was expected.");
        } catch (RuntimeException re) {
            if (peaEx2.getException() != re) {
                // FAIL
                throw new TestException(
                        "'doPrivileged' method threw " + re + " while "
                        + peaEx2.getException() + " was expected.");
            }
        }

        // PASS
        logger.fine("RuntimeException was thrown as expected.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.