From: David S. <ds...@us...> - 2006-10-18 19:36:39
|
Update of /cvsroot/junit/junit/org/junit/runners In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv6163/org/junit/runners Modified Files: Tag: saff_r41_runner_refactoring ParameterizedInterpreter.java Log Message: PerTestNotifier is gone Index: ParameterizedInterpreter.java =================================================================== RCS file: /cvsroot/junit/junit/org/junit/runners/Attic/ParameterizedInterpreter.java,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -d -r1.1.2.2 -r1.1.2.3 --- ParameterizedInterpreter.java 18 Oct 2006 18:22:14 -0000 1.1.2.2 +++ ParameterizedInterpreter.java 18 Oct 2006 19:36:35 -0000 1.1.2.3 @@ -8,6 +8,7 @@ import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import java.lang.reflect.Modifier; import java.util.Collection; import java.util.List; @@ -96,7 +97,7 @@ private Collection getParametersList(JavaClass javaClass) throws InitializationError { - JavaMethod parametersMethod= getParametersMethod(javaClass); + Method parametersMethod= getParametersMethod(javaClass); try { return (Collection) parametersMethod.invoke(null); } catch (Exception e) { @@ -104,14 +105,14 @@ } } - private JavaMethod getParametersMethod(JavaClass javaClass) + private Method getParametersMethod(JavaClass javaClass) throws InitializationError { // TODO: is this DUP? - List<JavaMethod> methods= javaClass.getMethods(Parameters.class, - new JavaTestInterpreter()); + List<Method> methods= javaClass.getMethods(Parameters.class); - for (JavaMethod each : methods) { - if (each.isStatic() && each.isPublic()) { + for (Method each : methods) { + int mods= each.getModifiers(); + if (Modifier.isStatic(mods) && Modifier.isPublic(mods)) { return each; } } |