This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-validator.git


The following commit(s) were added to refs/heads/master by this push:
     new 50f4687e Update call deprecated in Java 9
50f4687e is described below

commit 50f4687e77c2117c1410b344ee82a85e733fb4b0
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Mon Oct 2 15:20:51 2023 -0400

    Update call deprecated in Java 9
---
 src/main/java/org/apache/commons/validator/ValidatorAction.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/validator/ValidatorAction.java 
b/src/main/java/org/apache/commons/validator/ValidatorAction.java
index 6a8c2692..5c7bd0c3 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 @@ public class ValidatorAction implements Serializable {
 
         } 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

Reply via email to