From 795e041074a189dc999c4e6141e899fdade04bcb Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Fri, 21 Jan 2011 02:28:44 +0000 Subject: [PATCH] Only check public methods git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061599 13f79535-47bb-0310-9956-ffa450edef68 --- src/test/java/org/apache/commons/math/util/FastMathTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/apache/commons/math/util/FastMathTest.java b/src/test/java/org/apache/commons/math/util/FastMathTest.java index ca5344db8..665da6b4f 100644 --- a/src/test/java/org/apache/commons/math/util/FastMathTest.java +++ b/src/test/java/org/apache/commons/math/util/FastMathTest.java @@ -17,6 +17,7 @@ package org.apache.commons.math.util; import java.lang.reflect.Method; +import java.lang.reflect.Modifier; import java.lang.reflect.Type; import org.apache.commons.math.dfp.Dfp; @@ -1027,7 +1028,7 @@ public class FastMathTest { Method math[] = StrictMath.class.getDeclaredMethods(); for(Method mathMethod : math) { Type ret = mathMethod.getGenericReturnType(); - if (ret.equals(type)){ + if (ret.equals(type) && Modifier.isPublic(mathMethod.getModifiers())){ Type []params = mathMethod.getGenericParameterTypes(); if (params.length ==1 && params[0].equals(type)) { Method fastMethod = null;