Only check public methods

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1061599 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2011-01-21 02:28:44 +00:00
parent 5ac5c98b80
commit 795e041074
1 changed files with 2 additions and 1 deletions

View File

@ -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;