Permalink
Browse files

Don't use static import for MessageFormat.format

  • Loading branch information...
1 parent 08c7053 commit 45971737eee03f9df5396c3b72703e24cfd84988 @stefanbirkner stefanbirkner committed with ebruchez Mar 5, 2012
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 4597173

Please sign in to comment.