Skip to content

Commit ff1a465

Browse files
committed
Polish
1 parent a10b000 commit ff1a465

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/MapBinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ protected Object bindAggregate(ConfigurationPropertyName name, Bindable<?> targe
7979
private Map<Object, Object> createMap(Bindable<?> target) {
8080
Class<?> mapType = (target.getValue() != null) ? Map.class : target.getType().resolve(Object.class);
8181
if (EnumMap.class.isAssignableFrom(mapType)) {
82-
Class<?> keyType = target.getType().asMap().getGeneric(0).resolve();
82+
Class<?> keyType = target.getType().asMap().resolveGeneric(0);
8383
return CollectionFactory.createMap(mapType, keyType, 0);
8484
}
8585
return CollectionFactory.createMap(mapType, 0);

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/ValueObjectBinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ private <T> T getNewDefaultValueInstanceIfPossible(Binder.Context context, Resol
158158
return (T) CollectionFactory.createCollection(resolved, 0);
159159
}
160160
if (EnumMap.class.isAssignableFrom(resolved)) {
161-
Class<?> keyType = type.asMap().getGeneric(0).resolve();
161+
Class<?> keyType = type.asMap().resolveGeneric(0);
162162
return (T) CollectionFactory.createMap(resolved, keyType, 0);
163163
}
164164
if (Map.class.isAssignableFrom(resolved)) {

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/Ssl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ public void setProtocol(String protocol) {
318318
/**
319319
* Returns if SSL is enabled for the given instance.
320320
* @param ssl the {@link Ssl SSL} instance or {@code null}
321-
* @return {@code true} is SSL is enabled
321+
* @return {@code true} if SSL is enabled
322322
* @since 3.1.0
323323
*/
324324
public static boolean isEnabled(Ssl ssl) {

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/MapBinderTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,6 @@ void bindToEnumMapShouldBind() {
649649
Binder binder = new Binder(this.sources, null, null, null);
650650
EnumMap<ExampleEnum, String> result = binder.bind("props", EXAMPLE_ENUM_STRING_ENUM_MAP).get();
651651
assertThat(result).hasSize(1).containsEntry(ExampleEnum.FOO_BAR, "value");
652-
653652
}
654653

655654
private <K, V> Bindable<Map<K, V>> getMapBindable(Class<K> keyGeneric, ResolvableType valueType) {

0 commit comments

Comments
 (0)