Package java.security

Examples of java.security.PrivilegedActionException


                                try {
                                    Object obj = _unmarshaller.unmarshal(_xmlStreamReader, _concreteType).getValue();
                                    closeXMLStreamReader(_xmlStreamReader);
                                    return obj;
                                } catch (JAXBException e) {
                                    throw new PrivilegedActionException(e);
                                }
                            }
                        });
                } catch (PrivilegedActionException e) {
                    closeXMLStreamReader(xmlStreamReader);
View Full Code Here


        junit.textui.TestRunner.run(PrivilegedActionExceptionTest.class);
    }

    protected Object[] getData() {
        Exception ex = new Exception();
        PrivilegedActionException ex1 = new PrivilegedActionException(ex);
        return new PrivilegedActionException[] {
              new PrivilegedActionException(null),
              new PrivilegedActionException(ex),
              new PrivilegedActionException(ex1)
        };
    }
View Full Code Here

       
        // common checks
        THROWABLE_COMPARATOR.assertDeserialized(reference, otest);
       
        // class specific checks
        PrivilegedActionException ref = (PrivilegedActionException)reference;
        PrivilegedActionException test = (PrivilegedActionException)otest;
        if( ref.getException() == null ) {
            assertNull( test.getException() );
        } else {
            THROWABLE_COMPARATOR.assertDeserialized(ref.getException(), test
                    .getException());
        }
    }
View Full Code Here

  /**
   * @tests java.security.PrivilegedActionException#PrivilegedActionException(java.lang.Exception)
   */
  public void test_ConstructorLjava_lang_Exception() {
    Exception e = new Exception("test exception");
    PrivilegedActionException pe = new PrivilegedActionException(e);
    assertEquals("Did not encapsulate test exception!", e, pe
        .getException());

    // try it with a null exception
    pe = new PrivilegedActionException(null);
    assertNull("Did not encapsulate null test exception properly!", pe
        .getException());
  }
View Full Code Here

  /**
   * @tests java.security.PrivilegedActionException#getException()
   */
  public void test_getException() {
    Exception e = new IOException("test IOException");
    PrivilegedActionException pe = new PrivilegedActionException(e);
    assertEquals("Did not encapsulate test IOException!", e, pe
        .getException());
  }
View Full Code Here

                try {
                    return op.run();
                } catch (Exception e) {
                    if (e instanceof RuntimeException)
                        throw (RuntimeException) e;
                    throw new PrivilegedActionException(e);
                }
            } else {
                return AccessController.doPrivileged(op, reqACC);
            }
        } catch (Error e) {
View Full Code Here

            try {
                return action.run();
            } catch (java.lang.RuntimeException e) {
                throw e;
            } catch (Exception e) {
                throw new PrivilegedActionException(e);
            }
        } else {
            return java.security.AccessController.doPrivileged(action);
        }
    }
View Full Code Here

            try {
                return action.run();
            } catch (java.lang.RuntimeException e) {
                throw e;
            } catch (Exception e) {
                throw new PrivilegedActionException(e);
            }
        } else {
            return java.security.AccessController.doPrivileged(action, context);
        }
    }
View Full Code Here

                    logger.trace("Calling CreationUtils.injectFields for instance");
                    try {
                        CreationUtils.injectFields(instance, classMetadata, RuntimeContextTLS
                            .getRuntimeContext());
                    } catch (IOException e) {
                        throw new PrivilegedActionException(e);
                    }
                    return null;
                }
            });
        } catch (Exception e) {
View Full Code Here

            {
               return getContextClassLoader().loadClass(name);
            }
            catch ( Exception e)
            {
               throw new PrivilegedActionException(e);
            }
         }
      });
   }
View Full Code Here

TOP

Related Classes of java.security.PrivilegedActionException

Copyright © 2018 www.massapicom. 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.