diff --git a/src/main/java/org/apache/commons/validator/ValidatorAction.java b/src/main/java/org/apache/commons/validator/ValidatorAction.java index 6a8c26924..5c7bd0c31 100644 --- a/src/main/java/org/apache/commons/validator/ValidatorAction.java +++ b/src/main/java/org/apache/commons/validator/ValidatorAction.java @@ -688,8 +688,8 @@ private Object getValidationClassInstance() throws ValidatorException { } else if (this.instance == null) { try { - this.instance = this.validationClass.newInstance(); - } catch (InstantiationException | IllegalAccessException e) { + this.instance = this.validationClass.getConstructor().newInstance(); + } catch (ReflectiveOperationException e) { final String msg1 = "Couldn't create instance of " + this.classname