This commit is contained in:
Keith Donald
2008-06-23 14:04:25 +00:00
parent 0d8ed4d800
commit f7d0ec1008

View File

@@ -25,7 +25,7 @@ import org.springframework.util.Assert;
/**
* A general-purpose {@link FormatterRegistry} implementation allows formatters to be registered programatically.
*
* @see #registerFormatter(Class, Formatter)
* @see #registerFormatter(Formatter)
* @see #registerFormatter(String, Formatter)
*
* @author Keith Donald
@@ -50,9 +50,6 @@ public class GenericFormatterRegistry implements FormatterRegistry {
// impl
public void registerFormatter(Formatter formatter) {
Assert.notNull(clazz, "The class the formatter formats is required");
Assert.isTrue(!clazz.isPrimitive(),
"Registering Formatters of primitive classes not allowed: register wrapper Object classes instead");
Assert.notNull(formatter, "The formatter to register is required");
formattersByClass.put(formatter.getObjectType(), formatter);
}