Resource.isFile() and JAF MediaTypeFactory

Issue: SPR-14484
This commit is contained in:
Juergen Hoeller
2016-07-19 18:53:31 +02:00
parent 7287baefeb
commit 8bb34bc962
22 changed files with 270 additions and 262 deletions

View File

@@ -75,10 +75,10 @@ public class CollectionToCollectionConverterTests {
conversionService.addConverterFactory(new StringToNumberConverterFactory());
assertTrue(conversionService.canConvert(sourceType, targetType));
@SuppressWarnings("unchecked")
List<String> result = (List<String>) conversionService.convert(list, sourceType, targetType);
List<Integer> result = (List<Integer>) conversionService.convert(list, sourceType, targetType);
assertFalse(list.equals(result));
assertEquals(9, result.get(0));
assertEquals(37, result.get(1));
assertEquals(9, result.get(0).intValue());
assertEquals(37, result.get(1).intValue());
}
@Test
@@ -303,6 +303,11 @@ public class CollectionToCollectionConverterTests {
return false;
}
@Override
public boolean isFile() {
return false;
}
@Override
public URL getURL() throws IOException {
return null;