Skip to content

Commit eba1aba

Browse files
committed
Specifically detect Joda-Time 2.x
Closes gh-25655
1 parent 0117a5f commit eba1aba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spring-context/src/main/java/org/springframework/format/support/DefaultFormattingConversionService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 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.
@@ -39,7 +39,7 @@
3939
* {@link DefaultConversionService#addDefaultConverters addDefaultConverters} method.
4040
*
4141
* <p>Automatically registers formatters for JSR-354 Money & Currency, JSR-310 Date-Time
42-
* and/or Joda-Time, depending on the presence of the corresponding API on the classpath.
42+
* and/or Joda-Time 2.x, depending on the presence of the corresponding API on the classpath.
4343
*
4444
* @author Chris Beams
4545
* @author Juergen Hoeller
@@ -54,7 +54,7 @@ public class DefaultFormattingConversionService extends FormattingConversionServ
5454
static {
5555
ClassLoader classLoader = DefaultFormattingConversionService.class.getClassLoader();
5656
jsr354Present = ClassUtils.isPresent("javax.money.MonetaryAmount", classLoader);
57-
jodaTimePresent = ClassUtils.isPresent("org.joda.time.LocalDate", classLoader);
57+
jodaTimePresent = ClassUtils.isPresent("org.joda.time.YearMonth", classLoader);
5858
}
5959

6060

0 commit comments

Comments
 (0)