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

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

commit bc04683e4d6080688ff768023d8c56fc19e0215d
Author: Alex Herbert <aherb...@apache.org>
AuthorDate: Tue Nov 21 18:56:03 2023 +0000

    Remove empty arrays to varargs reflection methods
---
 .../java/org/apache/commons/math4/legacy/stat/CertifiedDataTest.java  | 3 +--
 .../commons/math4/legacy/stat/data/CertifiedDataAbstractTest.java     | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git 
a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/CertifiedDataTest.java
 
b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/CertifiedDataTest.java
index f661b2b00..867723119 100644
--- 
a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/CertifiedDataTest.java
+++ 
b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/CertifiedDataTest.java
@@ -104,8 +104,7 @@ public class CertifiedDataTest {
         } else {
             s = (SummaryStatistics) u;
         }
-        u.getClass().getDeclaredMethod(
-                "clear", new Class[]{}).invoke(u, new Object[]{});
+        u.getClass().getDeclaredMethod("clear").invoke(u);
         mean = Double.NaN;
         std = Double.NaN;
 
diff --git 
a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/data/CertifiedDataAbstractTest.java
 
b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/data/CertifiedDataAbstractTest.java
index 6a223b4f5..3a3e6b9ef 100644
--- 
a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/data/CertifiedDataAbstractTest.java
+++ 
b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/data/CertifiedDataAbstractTest.java
@@ -137,8 +137,8 @@ public abstract class CertifiedDataAbstractTest {
         try {
             // Get the value of prop
             String prop = "get" + name.substring(0,1).toUpperCase() + 
name.substring(1);
-            Method meth = bean.getClass().getMethod(prop, new Class[0]);
-            Object property = meth.invoke(bean, new Object[0]);
+            Method meth = bean.getClass().getMethod(prop);
+            Object property = meth.invoke(bean);
             if (meth.getReturnType().equals(Double.TYPE)) {
                 return (Double) property;
             } else if (meth.getReturnType().equals(Long.TYPE)) {

Reply via email to