Skip to content

Commit 3d50d41

Browse files
committed
SPR-8718 Revert fix from earlier for now (need a different approach).
1 parent 5309e43 commit 3d50d41

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

org.springframework.context/src/test/java/org/springframework/format/number/NumberFormattingTests.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
import org.junit.After;
2626
import org.junit.Before;
27-
import org.junit.Ignore;
2827
import org.junit.Test;
2928
import org.springframework.beans.MutablePropertyValues;
3029
import org.springframework.context.i18n.LocaleContextHolder;
@@ -69,8 +68,6 @@ public void tearDown() {
6968
LocaleContextHolder.setLocale(null);
7069
}
7170

72-
// TODO [SPR-8718] determine why changes to GenericConversionService broke this test
73-
@Ignore("Disabled until SPR-8718 is resolved")
7471
@Test
7572
public void testDefaultNumberFormatting() {
7673
MutablePropertyValues propertyValues = new MutablePropertyValues();

org.springframework.core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ private void assertNotPrimitiveTargetType(TypeDescriptor sourceType, TypeDescrip
485485
}
486486

487487
@SuppressWarnings("unchecked")
488-
private final class ConverterAdapter implements ConditionalGenericConverter {
488+
private final class ConverterAdapter implements GenericConverter {
489489

490490
private final ConvertiblePair typeInfo;
491491

@@ -500,11 +500,6 @@ public Set<ConvertiblePair> getConvertibleTypes() {
500500
return Collections.singleton(this.typeInfo);
501501
}
502502

503-
public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) {
504-
return (typeInfo.getTargetType().equals(targetType.getObjectType()) &&
505-
typeInfo.getSourceType().isAssignableFrom(sourceType.getObjectType()));
506-
}
507-
508503
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
509504
if (source == null) {
510505
return convertNullSource(sourceType, targetType);

org.springframework.core/src/test/java/org/springframework/core/convert/support/GenericConversionServiceTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import java.util.Map;
3838
import java.util.Set;
3939

40+
import org.junit.Ignore;
4041
import org.junit.Test;
4142
import org.springframework.core.convert.ConversionFailedException;
4243
import org.springframework.core.convert.ConverterNotFoundException;
@@ -209,6 +210,7 @@ public Integer convert(CharSequence source) {
209210
// SPR-8718
210211

211212
@Test(expected=ConverterNotFoundException.class)
213+
@Ignore("TODO")
212214
public void convertSuperTarget() {
213215
conversionService.addConverter(new ColorConverter());
214216
conversionService.convert("#000000", SystemColor.class);

0 commit comments

Comments
 (0)