From 11aa901634c7e312ceddf95e645da7c832139965 Mon Sep 17 00:00:00 2001 From: NaNRailgun <50312470+NaNrailgun@users.noreply.github.com> Date: Sun, 8 Nov 2020 22:40:01 +0800 Subject: [PATCH] Delete explicit type arguments that can be inferred Closes gh-26044 --- .../web/servlet/config/annotation/ViewResolverRegistry.java | 2 +- .../java/org/springframework/web/servlet/view/RedirectView.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ViewResolverRegistry.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ViewResolverRegistry.java index 2bedebabeda..690f74e8728 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ViewResolverRegistry.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ViewResolverRegistry.java @@ -284,7 +284,7 @@ public class ViewResolverRegistry { protected List getViewResolvers() { if (this.contentNegotiatingResolver != null) { - return Collections.singletonList(this.contentNegotiatingResolver); + return Collections.singletonList(this.contentNegotiatingResolver); } else { return this.viewResolvers; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java index 4c64b129d89..6ecaffcf965 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java @@ -398,7 +398,7 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView { private Map getCurrentRequestUriVariables(HttpServletRequest request) { String name = HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE; Map uriVars = (Map) request.getAttribute(name); - return (uriVars != null) ? uriVars : Collections. emptyMap(); + return (uriVars != null) ? uriVars : Collections.emptyMap(); } /**