polishing

This commit is contained in:
Juergen Hoeller
2009-12-09 17:54:02 +00:00
parent 8334a03e03
commit 2ce5090d00
5 changed files with 134 additions and 160 deletions

View File

@@ -4,6 +4,7 @@ import static org.junit.Assert.assertTrue;
import java.util.HashSet;
import java.util.Set;
import java.util.Collections;
import org.junit.Test;
import org.springframework.core.convert.ConversionService;
@@ -41,8 +42,8 @@ public class ConversionServiceFactoryBeanTests {
}
});
converters.add(new GenericConverter() {
public Class<?>[][] getConvertibleTypes() {
return new Class[][] { { String.class, Baz.class } };
public Set<ConvertiblePair> getConvertibleTypes() {
return Collections.singleton(new ConvertiblePair(String.class, Baz.class));
}
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
return new Baz();