From 0ac5c96673b4c5c2b08ab73b93692aac41b52ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rg=20Hohwiller?= Date: Tue, 12 Jan 2021 11:59:39 +0100 Subject: [PATCH] #310: fixed warnings with generic types --- .../general/service/impl/config/WebConfig.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/templates/server/src/main/resources/archetype-resources/core/src/main/java/__packageInPathFormat__/general/service/impl/config/WebConfig.java b/templates/server/src/main/resources/archetype-resources/core/src/main/java/__packageInPathFormat__/general/service/impl/config/WebConfig.java index 1ef96539..0941bf99 100644 --- a/templates/server/src/main/resources/archetype-resources/core/src/main/java/__packageInPathFormat__/general/service/impl/config/WebConfig.java +++ b/templates/server/src/main/resources/archetype-resources/core/src/main/java/__packageInPathFormat__/general/service/impl/config/WebConfig.java @@ -28,10 +28,10 @@ public class WebConfig { * with their duration and status code. */ @Bean - public FilterRegistrationBean performanceLogFilter() { + public FilterRegistrationBean performanceLogFilter() { - FilterRegistrationBean registration = new FilterRegistrationBean(); - Filter performanceLogFilter = new PerformanceLogFilter(); + FilterRegistrationBean registration = new FilterRegistrationBean<>(); + PerformanceLogFilter performanceLogFilter = new PerformanceLogFilter(); this.beanFactory.autowireBean(performanceLogFilter); registration.setFilter(performanceLogFilter); registration.addUrlPatterns("/*"); @@ -52,10 +52,10 @@ public DiagnosticContextFacade diagnosticContextFacade() { * correlation id as MDC so it will be included in all associated logs. */ @Bean - public FilterRegistrationBean diagnosticContextFilter() { + public FilterRegistrationBean diagnosticContextFilter() { - FilterRegistrationBean registration = new FilterRegistrationBean(); - Filter diagnosticContextFilter = new DiagnosticContextFilter(); + FilterRegistrationBean registration = new FilterRegistrationBean<>(); + DiagnosticContextFilter diagnosticContextFilter = new DiagnosticContextFilter(); this.beanFactory.autowireBean(diagnosticContextFilter); registration.setFilter(diagnosticContextFilter); registration.addUrlPatterns(ServiceConstants.URL_PATH_SERVICES + "/*"); @@ -66,9 +66,9 @@ public FilterRegistrationBean diagnosticContextFilter() { * @return the {@link FilterRegistrationBean} to register the {@link CharacterEncodingFilter} to set the encoding. */ @Bean - public FilterRegistrationBean setCharacterEncodingFilter() { + public FilterRegistrationBean setCharacterEncodingFilter() { - FilterRegistrationBean registration = new FilterRegistrationBean(); + FilterRegistrationBean registration = new FilterRegistrationBean<>(); CharacterEncodingFilter characterEncodingFilter = new CharacterEncodingFilter(); characterEncodingFilter.setEncoding("UTF-8"); characterEncodingFilter.setForceEncoding(false);