Permalink
Browse files

Don't use static import for MessageFormat.format

  • Loading branch information...
stefanbirkner committed Mar 5, 2012
1 parent e0cddcd commit d28f98205384c7c987b79b2b088507ab8b029c6d
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/main/java/org/junit/runners/Parameterized.java
@@ -1,7 +1,5 @@
package org.junit.runners;
-import static java.text.MessageFormat.format;
-
import java.lang.annotation.Annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -213,13 +211,14 @@ private void createRunnersForParameters(Iterable<Object[]> allParameters,
private String nameFor(String namePattern, int index, Object[] parameters) {
String finalPattern= namePattern.replaceAll("\\{index\\}",
Integer.toString(index));
- return format(finalPattern, parameters);
+ return MessageFormat.format(finalPattern, parameters);
}
private Exception parametersMethodReturnedWrongType() throws Exception {
String className= getTestClass().getName();
String methodName= getParametersMethod().getName();
- String message= format("{0}.{1}() must return an Iterable of arrays.",
+ String message= MessageFormat.format(
+ "{0}.{1}() must return an Iterable of arrays.",
className, methodName);
return new Exception(message);
}

0 comments on commit d28f982

Please sign in to comment.