From c4c3d59d07bfe7775f0df88f40babebd27975ca2 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Mon, 25 Oct 2021 17:02:58 +0200 Subject: [PATCH] Remove unused code in FormattingConversionServiceTests --- .../FormattingConversionServiceTests.java | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceTests.java b/spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceTests.java index eeb6895edd..8aff305f22 100644 --- a/spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceTests.java +++ b/spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -321,28 +321,6 @@ public class FormattingConversionServiceTests { TypeDescriptor.valueOf(String.class)); } - @Test - public void registerDefaultValueViaFormatter() { - registerDefaultValue(Date.class, new Date()); - } - - private void registerDefaultValue(Class clazz, final T defaultValue) { - formattingService.addFormatterForFieldType(clazz, new Formatter() { - @Override - public T parse(String text, Locale locale) { - return defaultValue; - } - @Override - public String print(T t, Locale locale) { - return defaultValue.toString(); - } - @Override - public String toString() { - return defaultValue.toString(); - } - }); - } - @Test public void introspectedFormatter() { formattingService.addFormatter(new NumberStyleFormatter("#,#00.0#"));