From 036b982dd7163104e83897806d91c1a0b624344f Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 5 Jun 2023 21:42:00 +0100 Subject: [PATCH] Start building against Spring Framework 6.0.10 snapshots This reverts commit bc63c511 as Framework's previous behavior has been restored. See gh-35751 --- gradle.properties | 2 +- .../boot/context/properties/bind/MapBinderTests.java | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index 7ff7e9a41d..204a053d4e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 kotlinVersion=1.8.21 nativeBuildToolsVersion=0.9.22 -springFrameworkVersion=6.0.9 +springFrameworkVersion=6.0.10-SNAPSHOT tomcatVersion=10.1.8 kotlin.stdlib.default.dependency=false diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/MapBinderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/MapBinderTests.java index 3e4b0f8d2c..cb03bcebc4 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/MapBinderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/MapBinderTests.java @@ -24,7 +24,6 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Properties; -import java.util.SortedMap; import java.util.stream.Collectors; import org.junit.jupiter.api.Test; @@ -245,7 +244,7 @@ class MapBinderTests { existing.put("baz", 1001); Bindable> target = STRING_INTEGER_MAP.withExistingValue(existing); Map result = this.binder.bind("foo", target).get(); - assertThat(result).isInstanceOf(HashMap.class); + assertThat(result).isExactlyInstanceOf(HashMap.class); assertThat(result).hasSize(2); assertThat(result).containsEntry("bar", 1); assertThat(result).containsEntry("baz", 1001); @@ -254,10 +253,10 @@ class MapBinderTests { @Test void bindToMapShouldRespectMapType() { this.sources.add(new MockConfigurationPropertySource("foo.bar", "1")); - ResolvableType type = ResolvableType.forClassWithGenerics(SortedMap.class, String.class, Integer.class); + ResolvableType type = ResolvableType.forClassWithGenerics(HashMap.class, String.class, Integer.class); Object defaultMap = this.binder.bind("foo", STRING_INTEGER_MAP).get(); Object customMap = this.binder.bind("foo", Bindable.of(type)).get(); - assertThat(customMap).isInstanceOf(SortedMap.class).isNotInstanceOf(defaultMap.getClass()); + assertThat(customMap).isExactlyInstanceOf(HashMap.class).isNotInstanceOf(defaultMap.getClass()); } @Test