registry
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user