polishing

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2613 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Juergen Hoeller
2009-12-09 17:54:02 +00:00
parent f1151210f1
commit fa07470e40
5 changed files with 134 additions and 160 deletions
@@ -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();