File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
engine/src/main/java/org/hibernate/validator/internal/util/privilegedactions Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 7
7
package org .hibernate .validator .internal .util .privilegedactions ;
8
8
9
9
import java .lang .invoke .MethodHandles ;
10
+ import java .lang .reflect .InvocationTargetException ;
10
11
import java .security .PrivilegedAction ;
11
12
12
13
import org .hibernate .validator .internal .util .logging .Log ;
@@ -37,9 +38,9 @@ private NewInstance(Class<T> clazz, String message) {
37
38
@ Override
38
39
public T run () {
39
40
try {
40
- return clazz .newInstance ();
41
+ return clazz .getConstructor (). newInstance ();
41
42
}
42
- catch (InstantiationException e ) {
43
+ catch (InstantiationException | NoSuchMethodException | InvocationTargetException e ) {
43
44
throw LOG .getUnableToInstantiateException ( message , clazz , e );
44
45
}
45
46
catch (IllegalAccessException e ) {
You can’t perform that action at this time.
0 commit comments