File tree Expand file tree Collapse file tree 1 file changed +1
-23
lines changed
spring-context/src/test/java/org/springframework/format/support Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2020 the original author or authors.
2
+ * Copyright 2002-2021 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -321,28 +321,6 @@ public Date convert(MyDate source) {
321
321
TypeDescriptor .valueOf (String .class ));
322
322
}
323
323
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
-
346
324
@ Test
347
325
public void introspectedFormatter () {
348
326
formattingService .addFormatter (new NumberStyleFormatter ("#,#00.0#" ));
You can’t perform that action at this time.
0 commit comments