pull/17915/head
Andy Wilkinson 5 years ago
parent cc3df98135
commit 7f8944d00f

@ -32,10 +32,8 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.hateoas.EntityModel;
import org.springframework.hateoas.client.LinkDiscoverers;
import org.springframework.hateoas.config.EnableEntityLinks;
import org.springframework.hateoas.config.EnableHypermediaSupport;
import org.springframework.hateoas.config.EnableHypermediaSupport.HypermediaType;
import org.springframework.hateoas.server.EntityLinks;
import org.springframework.plugin.core.Plugin;
import org.springframework.web.bind.annotation.RequestMapping;
@ -65,11 +63,4 @@ public class HypermediaAutoConfiguration {
}
@Configuration(proxyBeanMethods = false)
@ConditionalOnMissingBean(EntityLinks.class)
@EnableEntityLinks
protected static class EntityLinksConfiguration {
}
}

@ -22,7 +22,6 @@ import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.hateoas.HypermediaAutoConfiguration.EntityLinksConfiguration;
import org.springframework.boot.autoconfigure.hateoas.HypermediaAutoConfiguration.HypermediaConfiguration;
import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration;
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
@ -93,7 +92,6 @@ class HypermediaAutoConfigurationTests {
TestPropertyValues.of("spring.jackson.serialization.INDENT_OUTPUT:true").applyTo(this.context);
this.context.refresh();
assertThat(this.context.getBeansOfType(HypermediaConfiguration.class)).isEmpty();
assertThat(this.context.getBeansOfType(EntityLinksConfiguration.class)).isEmpty();
}
@Test

@ -36,7 +36,8 @@ import org.springframework.util.MultiValueMap;
* @author Phillip Webb
* @author Madhura Bhave
*/
abstract class AbstractTypeToEnumConverterFactory<T> implements ConverterFactory<T, Enum> {
@SuppressWarnings("rawtypes")
abstract class AbstractTypeToEnumConverterFactory<T> implements ConverterFactory<T, Enum<?>> {
private static Map<String, List<String>> ALIASES;
@ -48,7 +49,7 @@ abstract class AbstractTypeToEnumConverterFactory<T> implements ConverterFactory
}
@Override
public <E extends Enum> Converter<T, E> getConverter(Class<E> targetType) {
public <E extends Enum<?>> Converter<T, E> getConverter(Class<E> targetType) {
Class<?> enumType = targetType;
while (enumType != null && !enumType.isEnum()) {
enumType = enumType.getSuperclass();
@ -59,6 +60,7 @@ abstract class AbstractTypeToEnumConverterFactory<T> implements ConverterFactory
abstract <E extends Enum> Converter<T, E> getTypeToEnumConverter(Class<E> targetType);
@SuppressWarnings("unchecked")
<E extends Enum> E findEnum(String source, Class<E> enumType) {
Map<String, E> candidates = new LinkedHashMap<>();
for (E candidate : (Set<E>) EnumSet.allOf(enumType)) {

@ -24,7 +24,7 @@ import org.springframework.core.convert.converter.Converter;
*
* @author Madhura Bhave
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
@SuppressWarnings("rawtypes")
final class BooleanToEnumConverterFactory extends AbstractTypeToEnumConverterFactory<Boolean> {
@Override

@ -0,0 +1,20 @@
/*
* Copyright 2012-2019 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Support classes for Reactor integration.
*/
package org.springframework.boot.reactor;

@ -25,7 +25,6 @@ import java.util.Map;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
/**
* Tests for {@link LoggerGroups}
@ -35,8 +34,6 @@ import static org.mockito.Mockito.mock;
*/
class LoggerGroupsTests {
private LoggingSystem loggingSystem = mock(LoggingSystem.class);
@Test
void putAllShouldAddLoggerGroups() {
Map<String, List<String>> groups = Collections.singletonMap("test",

Loading…
Cancel
Save