use of org.hibernate.validator.internal.util.privilegedactions.LoadClass in project hibernate-validator by hibernate.
the class LoadClassTest method test_loading_dummy_class_throws_exception_without_fallback_to_tcl.
@Test
public void test_loading_dummy_class_throws_exception_without_fallback_to_tcl() {
final LoadClass action = LoadClass.action("org.hibernate.validator.Dummy", null, false);
runLoadClass(action);
}
use of org.hibernate.validator.internal.util.privilegedactions.LoadClass in project hibernate-validator by hibernate.
the class LoadClassTest method test_loading_dummy_class_throws_exception_with_fallback_to_tcl.
@Test
public void test_loading_dummy_class_throws_exception_with_fallback_to_tcl() {
final LoadClass action = LoadClass.action("org.hibernate.validator.Dummy", null, true);
final ClassLoader current = currentThread().getContextClassLoader();
try {
currentThread().setContextClassLoader(null);
runLoadClass(action);
} finally {
currentThread().setContextClassLoader(current);
}
}