Some Sonar fixes

This commit is contained in:
Artem Bilan
2022-11-01 16:29:14 -04:00
parent bd207ff42a
commit 6284070b45
9 changed files with 73 additions and 84 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2021 the original author or authors.
* Copyright 2021-2022 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.
@@ -16,6 +16,8 @@
package org.springframework.integration.http.config;
import java.util.Arrays;
import org.springframework.web.reactive.config.CorsRegistry;
import org.springframework.web.reactive.config.WebFluxConfigurer;
@@ -34,9 +36,9 @@ final class WebFluxIntegrationGraphCorsConfigurer implements WebFluxConfigurer {
private final String[] allowedOrigins;
WebFluxIntegrationGraphCorsConfigurer(String path, String[] allowedOrigins) { // NOSONAR
WebFluxIntegrationGraphCorsConfigurer(String path, String[] allowedOrigins) {
this.path = path;
this.allowedOrigins = allowedOrigins;
this.allowedOrigins = Arrays.copyOf(allowedOrigins, allowedOrigins.length);
}
@Override

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2021 the original author or authors.
* Copyright 2021-2022 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.
@@ -16,6 +16,8 @@
package org.springframework.integration.http.config;
import java.util.Arrays;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@@ -34,9 +36,9 @@ final class WebMvcIntegrationGraphCorsConfigurer implements WebMvcConfigurer {
private final String[] allowedOrigins;
WebMvcIntegrationGraphCorsConfigurer(String path, String[] allowedOrigins) { // NOSONAR
WebMvcIntegrationGraphCorsConfigurer(String path, String[] allowedOrigins) {
this.path = path;
this.allowedOrigins = allowedOrigins;
this.allowedOrigins = Arrays.copyOf(allowedOrigins, allowedOrigins.length);
}
@Override