mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-22 22:19:03 +00:00
polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2613 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
+3
-2
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user