diff --git a/spring-context/src/main/java/org/springframework/context/event/AbstractApplicationEventMulticaster.java b/spring-context/src/main/java/org/springframework/context/event/AbstractApplicationEventMulticaster.java index 447ee5540e..f594fee5a6 100644 --- a/spring-context/src/main/java/org/springframework/context/event/AbstractApplicationEventMulticaster.java +++ b/spring-context/src/main/java/org/springframework/context/event/AbstractApplicationEventMulticaster.java @@ -60,8 +60,7 @@ public abstract class AbstractApplicationEventMulticaster private final ListenerRetriever defaultRetriever = new ListenerRetriever(false); - final Map retrieverCache = - new ConcurrentHashMap<>(64); + final Map retrieverCache = new ConcurrentHashMap<>(64); private ClassLoader beanClassLoader; diff --git a/spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java b/spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java index 9244e502c7..5188352790 100644 --- a/spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java +++ b/spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java @@ -139,40 +139,35 @@ public class GenericTypeResolverTests { assertThat(x, equalTo((Type) Long.class)); } - @Test + @Test // SPR-11030 public void getGenericsCannotBeResolved() throws Exception { - // SPR-11030 Class[] resolved = GenericTypeResolver.resolveTypeArguments(List.class, Iterable.class); assertNull(resolved); } - @Test + @Test // SPR-11052 public void getRawMapTypeCannotBeResolved() throws Exception { - // SPR-11052 Class[] resolved = GenericTypeResolver.resolveTypeArguments(Map.class, Map.class); assertNull(resolved); } - @Test + @Test // SPR-11044 public void getGenericsOnArrayFromParamCannotBeResolved() throws Exception { - // SPR-11044 MethodParameter methodParameter = MethodParameter.forExecutable( WithArrayBase.class.getDeclaredMethod("array", Object[].class), 0); Class resolved = GenericTypeResolver.resolveParameterType(methodParameter, WithArray.class); assertThat(resolved, equalTo((Class) Object[].class)); } - @Test + @Test // SPR-11044 public void getGenericsOnArrayFromReturnCannotBeResolved() throws Exception { - // SPR-11044 Class resolved = GenericTypeResolver.resolveReturnType( WithArrayBase.class.getDeclaredMethod("array", Object[].class), WithArray.class); assertThat(resolved, equalTo((Class) Object[].class)); } - @Test + @Test // SPR-11763 public void resolveIncompleteTypeVariables() { - // SPR-11763 Class[] resolved = GenericTypeResolver.resolveTypeArguments(IdFixingRepository.class, Repository.class); assertNotNull(resolved); assertEquals(2, resolved.length); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java index 6e47509b67..065a254bed 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/NamedParameterUtilsTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/NamedParameterUtilsTests.java index d7c2b3f737..b18eb90124 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/NamedParameterUtilsTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/NamedParameterUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. diff --git a/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java b/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java index 4f59b8091c..6c691b2f71 100644 --- a/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java +++ b/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java @@ -71,6 +71,7 @@ public class ForwardedHeaderFilter extends OncePerRequestFilter { private final UrlPathHelper pathHelper; + public ForwardedHeaderFilter() { this.pathHelper = new UrlPathHelper(); this.pathHelper.setUrlDecode(false); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletInvocableHandlerMethod.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletInvocableHandlerMethod.java index 8ea68dc58a..1a7ab8eab3 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletInvocableHandlerMethod.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletInvocableHandlerMethod.java @@ -249,13 +249,10 @@ public class ServletInvocableHandlerMethod extends InvocableHandlerMethod { public ConcurrentResultMethodParameter(Object returnValue) { super(-1); this.returnValue = returnValue; - ResolvableType candidateReturnType = ResolvableType.forType(super.getGenericParameterType()).getGeneric(0); - - this.returnType = returnValue instanceof ReactiveTypeHandler.CollectedValuesList ? - ResolvableType.forClassWithGenerics(List.class, candidateReturnType) : - candidateReturnType; + this.returnType = (returnValue instanceof ReactiveTypeHandler.CollectedValuesList ? + ResolvableType.forClassWithGenerics(List.class, candidateReturnType) : candidateReturnType); } public ConcurrentResultMethodParameter(ConcurrentResultMethodParameter original) {