From ec6dd9b8c1ddb2cd6cfb307a49b67080f25c3d18 Mon Sep 17 00:00:00 2001 From: prasanthomanakuttan Date: Tue, 13 Sep 2022 08:34:51 +0530 Subject: [PATCH 1/3] Refactor - Use method reference --- .../jhipster/registry/service/CloudConfigRefreshService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tech/jhipster/registry/service/CloudConfigRefreshService.java b/src/main/java/tech/jhipster/registry/service/CloudConfigRefreshService.java index f0fd14af8..7734c4b2f 100644 --- a/src/main/java/tech/jhipster/registry/service/CloudConfigRefreshService.java +++ b/src/main/java/tech/jhipster/registry/service/CloudConfigRefreshService.java @@ -124,7 +124,7 @@ public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IO if (log.isDebugEnabled()) { events.forEach(event -> log.debug("Event detected: " + event.kind().name() + ", Updated File: " + event.context())); } - Collection activeList = fileList.stream().map(entry -> getHashValue(entry)).collect(Collectors.toList()); + Collection activeList = fileList.stream().map(this::getHashValue).collect(Collectors.toList()); if (!hashList.containsAll(activeList)) { log.debug("File system updated. Hashed content matching failed"); hashList.clear(); From 3e13752ff5eb093358861dfaff10d1f267dfbd1e Mon Sep 17 00:00:00 2001 From: prasanthomanakuttan Date: Tue, 13 Sep 2022 08:35:27 +0530 Subject: [PATCH 2/3] Refactor - Remove unused imports --- src/main/java/tech/jhipster/registry/config/WebConfigurer.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/java/tech/jhipster/registry/config/WebConfigurer.java b/src/main/java/tech/jhipster/registry/config/WebConfigurer.java index 525e679ee..4cce209b5 100644 --- a/src/main/java/tech/jhipster/registry/config/WebConfigurer.java +++ b/src/main/java/tech/jhipster/registry/config/WebConfigurer.java @@ -3,7 +3,6 @@ import static java.net.URLDecoder.decode; import java.io.File; -import java.io.UnsupportedEncodingException; import java.nio.charset.StandardCharsets; import java.nio.file.Paths; import javax.servlet.*; @@ -15,12 +14,10 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; -import org.springframework.core.env.Profiles; import org.springframework.util.CollectionUtils; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; import org.springframework.web.filter.CorsFilter; -import tech.jhipster.config.JHipsterConstants; import tech.jhipster.config.JHipsterProperties; /** From e2234019a7490c1afae0f9d2ffc78bd7e42f1051 Mon Sep 17 00:00:00 2001 From: prasanthomanakuttan Date: Tue, 13 Sep 2022 08:36:55 +0530 Subject: [PATCH 3/3] Refactor - Reorder modifier as per openJDK java style guidelines --- .../java/tech/jhipster/registry/security/SecurityUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tech/jhipster/registry/security/SecurityUtils.java b/src/main/java/tech/jhipster/registry/security/SecurityUtils.java index b7155525e..5ab7c8234 100644 --- a/src/main/java/tech/jhipster/registry/security/SecurityUtils.java +++ b/src/main/java/tech/jhipster/registry/security/SecurityUtils.java @@ -18,7 +18,7 @@ */ public final class SecurityUtils { - public static final String CLAIMS_NAMESPACE = "https://www.jhipster.tech/"; + public static final String CLAIMS_NAMESPACE = "https://www.jhipster.tech/"; private SecurityUtils() {}