Skip to content

Commit c4c3d59

Browse files
committed
Remove unused code in FormattingConversionServiceTests
1 parent 0268e76 commit c4c3d59

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceTests.java

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -321,28 +321,6 @@ public Date convert(MyDate source) {
321321
TypeDescriptor.valueOf(String.class));
322322
}
323323

324-
@Test
325-
public void registerDefaultValueViaFormatter() {
326-
registerDefaultValue(Date.class, new Date());
327-
}
328-
329-
private <T> void registerDefaultValue(Class<T> clazz, final T defaultValue) {
330-
formattingService.addFormatterForFieldType(clazz, new Formatter<T>() {
331-
@Override
332-
public T parse(String text, Locale locale) {
333-
return defaultValue;
334-
}
335-
@Override
336-
public String print(T t, Locale locale) {
337-
return defaultValue.toString();
338-
}
339-
@Override
340-
public String toString() {
341-
return defaultValue.toString();
342-
}
343-
});
344-
}
345-
346324
@Test
347325
public void introspectedFormatter() {
348326
formattingService.addFormatter(new NumberStyleFormatter("#,#00.0#"));

0 commit comments

Comments
 (0)