Skip to content

Commit

Permalink
HV-756 Switching from ClassLoader#loadClass to Class#forName
Browse files Browse the repository at this point in the history
  • Loading branch information
hferentschik authored and gunnarmorling committed Mar 13, 2013
1 parent abfc0cc commit b6d4040
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Expand Up @@ -114,7 +114,6 @@ public static Class<?> loadClass(String className, Class<?> caller) {

public static Class<?> loadClass(String className, String defaultPackage) {
return loadClass( className, defaultPackage, ReflectionHelper.class );

}

public static Class<?> loadClass(String className, String defaultPackage, Class<?> caller) {
Expand Down
Expand Up @@ -69,7 +69,7 @@ private Class<?> loadClassInValidatorNameSpace() {
try {
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
if ( contextClassLoader != null ) {
return contextClassLoader.loadClass( className );
return Class.forName( className, false, contextClassLoader );
}
else {
throw log.getUnableToLoadClassException( className );
Expand All @@ -84,7 +84,7 @@ private Class<?> loadNonValidatorClass() {
try {
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
if ( contextClassLoader != null ) {
return contextClassLoader.loadClass( className );
return Class.forName( className, false, contextClassLoader );
}
}
catch ( ClassNotFoundException e ) {
Expand Down

0 comments on commit b6d4040

Please sign in to comment.