Permalink
Browse files

remove shortcut for .*

  • Loading branch information...
1 parent 2dfa4c2 commit 0d56db07ce1dda39fb8f88dd4c06b42f4f6efd67 @schaarsc committed Sep 1, 2012
Showing with 4 additions and 10 deletions.
  1. +4 −10 src/main/java/org/junit/runner/JUnitCore.java
@@ -34,11 +34,6 @@
*/
private static final String SEPARATOR= "#";
- /**
- * Method name wildcard, e.g. ClassName#M*Name
- */
- private static final String WILDCARD= "*";
-
private final RunNotifier fNotifier= new RunNotifier();
/**
@@ -138,16 +133,15 @@ public String getVersion() {
/**
* Convert method name with wildcard into a list of {@link Description}
- * @param clazz to search for methods matching <code>wildcardName</code>
- * @param wildcardName method name pattern
+ * @param clazz to search for methods matching <code>methodPattern</code>
+ * @param methodPattern method name pattern
* @return list of matching descriptions
*/
- private List<Description> findMatchingMethods(Class<?> clazz, String wildcardName) {
+ private List<Description> findMatchingMethods(Class<?> clazz, String methodPattern) {
List<Description> result = new ArrayList<Description>();
- String pattern = wildcardName.replace(WILDCARD, ".*");
for (Method m : clazz.getMethods()) {
final String methodName= m.getName();
- if (methodName.matches(pattern)) {
+ if (methodName.matches(methodPattern)) {
result.add(Description.createTestDescription(clazz, methodName));
}
}

0 comments on commit 0d56db0

Please sign in to comment.