summaryrefslogtreecommitdiffstats
path: root/so-monitoring/so-monitoring-handler
diff options
context:
space:
mode:
Diffstat (limited to 'so-monitoring/so-monitoring-handler')
-rw-r--r--so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/monitoring/configuration/rest/CorsConfigurer.java8
-rw-r--r--so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/db/api/DatabaseServiceProviderTest.java3
2 files changed, 3 insertions, 8 deletions
diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/monitoring/configuration/rest/CorsConfigurer.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/monitoring/configuration/rest/CorsConfigurer.java
index 557e2a63b7..0bcf24dbd8 100644
--- a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/monitoring/configuration/rest/CorsConfigurer.java
+++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/monitoring/configuration/rest/CorsConfigurer.java
@@ -20,16 +20,12 @@
package org.onap.so.monitoring.configuration.rest;
-import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.core.Ordered;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
-import java.util.concurrent.TimeUnit;
-
/**
* @author waqas.ikram@ericsson, eoin.hanan@ericsson.com
*/
@@ -38,8 +34,8 @@ public class CorsConfigurer {
@Bean
public CorsFilter corsFilter() {
- UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
- CorsConfiguration config = new CorsConfiguration();
+ final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+ final CorsConfiguration config = new CorsConfiguration();
config.setAllowCredentials(true);
config.addAllowedOrigin("*");
config.addAllowedHeader("*");
diff --git a/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/db/api/DatabaseServiceProviderTest.java b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/db/api/DatabaseServiceProviderTest.java
index 31ef747939..58666671a7 100644
--- a/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/db/api/DatabaseServiceProviderTest.java
+++ b/so-monitoring/so-monitoring-handler/src/test/java/org/onap/so/montoring/db/api/DatabaseServiceProviderTest.java
@@ -79,7 +79,6 @@ public class DatabaseServiceProviderTest {
assertTrue(objUnderTest.getSoInfraRequest(Collections.emptyMap(), 0, 0, null).isEmpty());
}
-
@Test
public void test_GetSoInfraRequest_WithFilters_InfraActiveRequestsList() {
final String searchUrl = URL_PROVIDER.getSearchUrl(0, 0, null);
@@ -87,7 +86,7 @@ public class DatabaseServiceProviderTest {
final Map<String, String[]> filters = new HashMap<>();
filters.put("requestId", new String[] {"EQ", requestID});
- SoActiveInfraRequests soActiveInfraRequests = new SoActiveInfraRequests();
+ final SoActiveInfraRequests soActiveInfraRequests = new SoActiveInfraRequests();
soActiveInfraRequests.setRequestId(requestID);
final Optional<SoActiveInfraRequests[]> response =