Package org.hibernate.validator.util

Examples of org.hibernate.validator.util.GetClassLoader.run()


    ClassLoader loader = isSecured ? AccessController.doPrivileged( action ) : action.run();

    if ( loader == null ) {
      log.debug( "No default context class loader, fall back to Bean Validation's loader" );
      action = GetClassLoader.fromClass( ValidationXmlParser.class );
      loader = isSecured ? AccessController.doPrivileged( action ) : action.run();
      isContextCL = false;
    }
    InputStream inputStream = loader.getResourceAsStream( path );

    // try the current class loader
View Full Code Here


    InputStream inputStream = loader.getResourceAsStream( path );

    // try the current class loader
    if ( isContextCL && inputStream == null ) {
      action = GetClassLoader.fromClass( ValidationXmlParser.class );
      loader = isSecured ? AccessController.doPrivileged( action ) : action.run();
      inputStream = loader.getResourceAsStream( path );
    }
    return inputStream;
  }
View Full Code Here

  }

  private Schema getValidationConfigurationSchema() {
    boolean isSecured = System.getSecurityManager() != null;
    GetClassLoader action = GetClassLoader.fromClass( ValidationXmlParser.class );
    ClassLoader loader = isSecured ? AccessController.doPrivileged( action ) : action.run();
    URL schemaUrl = loader.getResource( VALIDATION_CONFIGURATION_XSD );
    SchemaFactory sf = SchemaFactory.newInstance( javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI );
    Schema schema = null;
    try {
      schema = sf.newSchema( schemaUrl );
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.