Repository: jhipster/jhipster-lite
Pull request #12431 (2025-05-01 12:34:03)

Rename: Ehcache
<img width="308" alt="image" src="https://github.com/user-attachments/assets/19395327-031a-4091-a8e2-1ef18bb7cff1" />


Patch:
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/application/EhcacheApplicationService.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/application/EhcacheApplicationService.java
index f60d7e340..50c89edb6 100644
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/application/EhcacheApplicationService.java
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/application/EhcacheApplicationService.java
@@ -1,17 +1,17 @@
 package tech.jhipster.lite.generator.server.springboot.cache.ehcache.application;
 
 import org.springframework.stereotype.Service;
-import tech.jhipster.lite.generator.server.springboot.cache.ehcache.domain.EHCacheModuleFactory;
+import tech.jhipster.lite.generator.server.springboot.cache.ehcache.domain.EhcacheModuleFactory;
 import tech.jhipster.lite.module.domain.JHipsterModule;
 import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
 
 @Service
 public class EhcacheApplicationService {
 
-  private final EHCacheModuleFactory ehCache;
+  private final EhcacheModuleFactory ehCache;
 
   public EhcacheApplicationService() {
-    ehCache = new EHCacheModuleFactory();
+    ehCache = new EhcacheModuleFactory();
   }
 
   public JHipsterModule buildJavaConfigurationModule(JHipsterModuleProperties properties) {
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/domain/EHCacheModuleFactory.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/domain/EhcacheModuleFactory.java
similarity index 99%
rename from src/main/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/domain/EHCacheModuleFactory.java
rename to src/main/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/domain/EhcacheModuleFactory.java
index 939ce1574..933522eee 100644
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/domain/EHCacheModuleFactory.java
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/domain/EhcacheModuleFactory.java
@@ -19,7 +19,7 @@ import tech.jhipster.lite.module.domain.file.JHipsterSource;
 import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
 import tech.jhipster.lite.shared.error.domain.Assert;
 
-public class EHCacheModuleFactory {
+public class EhcacheModuleFactory {
 
   private static final JHipsterSource SOURCE = from("server/springboot/cache/ehcache");
 
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/infrastructure/primary/EHCacheModuleConfiguration.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/infrastructure/primary/EhcacheModuleConfiguration.java
similarity index 98%
rename from src/main/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/infrastructure/primary/EHCacheModuleConfiguration.java
rename to src/main/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/infrastructure/primary/EhcacheModuleConfiguration.java
index 4b35a066d..44fda1b8f 100644
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/infrastructure/primary/EHCacheModuleConfiguration.java
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/infrastructure/primary/EhcacheModuleConfiguration.java
@@ -13,7 +13,7 @@ import tech.jhipster.lite.module.domain.resource.JHipsterModulePropertiesDefinit
 import tech.jhipster.lite.module.domain.resource.JHipsterModuleResource;
 
 @Configuration
-class EHCacheModuleConfiguration {
+class EhcacheModuleConfiguration {
 
   private static final String SPRING_BOOT_TAG = "spring-boot";
   private static final String CACHE_TAG = "cache";
diff --git a/src/main/java/tech/jhipster/lite/generator/setup/codespaces/infrastructure/primary/CodespacesModuleConfiguration.java b/src/main/java/tech/jhipster/lite/generator/setup/codespaces/infrastructure/primary/CodespaceModuleConfiguration.java
similarity index 96%
rename from src/main/java/tech/jhipster/lite/generator/setup/codespaces/infrastructure/primary/CodespacesModuleConfiguration.java
rename to src/main/java/tech/jhipster/lite/generator/setup/codespaces/infrastructure/primary/CodespaceModuleConfiguration.java
index 905bd60cf..166b2d38d 100644
--- a/src/main/java/tech/jhipster/lite/generator/setup/codespaces/infrastructure/primary/CodespacesModuleConfiguration.java
+++ b/src/main/java/tech/jhipster/lite/generator/setup/codespaces/infrastructure/primary/CodespaceModuleConfiguration.java
@@ -9,7 +9,7 @@ import tech.jhipster.lite.module.domain.resource.JHipsterModulePropertiesDefinit
 import tech.jhipster.lite.module.domain.resource.JHipsterModuleResource;
 
 @Configuration
-class CodespacesModuleConfiguration {
+class CodespaceModuleConfiguration {
 
   @Bean
   JHipsterModuleResource codespaceModule(CodespacesApplicationService codespaces) {
diff --git a/src/main/java/tech/jhipster/lite/module/infrastructure/secondary/YamlFileSpringPropertiesHandler.java b/src/main/java/tech/jhipster/lite/module/infrastructure/secondary/YamlFileSpringPropertiesHandler.java
index 5d152a604..6af66e17c 100644
--- a/src/main/java/tech/jhipster/lite/module/infrastructure/secondary/YamlFileSpringPropertiesHandler.java
+++ b/src/main/java/tech/jhipster/lite/module/infrastructure/secondary/YamlFileSpringPropertiesHandler.java
@@ -169,11 +169,11 @@ class YamlFileSpringPropertiesHandler {
 
   private Function<Node, MappingNode> toExistingMappingNode(String partialKey) {
     return valueNode -> {
-      if (!(valueNode instanceof MappingNode mappingNode)) {
+      if (!(valueNode instanceof MappingNode)) {
         throw GeneratorException.technicalError("Error updating Yaml properties: can't define a subproperty of %s ".formatted(partialKey));
       }
 
-      return mappingNode;
+      return (MappingNode) valueNode;
     };
   }
 


Test patch:
diff --git a/src/test/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/domain/EHCacheModuleFactoryTest.java b/src/test/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/domain/EhcacheModuleFactoryTest.java
similarity index 96%
rename from src/test/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/domain/EHCacheModuleFactoryTest.java
rename to src/test/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/domain/EhcacheModuleFactoryTest.java
index d92ee910a..59ab621d7 100644
--- a/src/test/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/domain/EHCacheModuleFactoryTest.java
+++ b/src/test/java/tech/jhipster/lite/generator/server/springboot/cache/ehcache/domain/EhcacheModuleFactoryTest.java
@@ -10,9 +10,9 @@ import tech.jhipster.lite.module.domain.JHipsterModulesFixture;
 import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
 
 @UnitTest
-class EHCacheModuleFactoryTest {
+class EhcacheModuleFactoryTest {
 
-  private static final EHCacheModuleFactory factory = new EHCacheModuleFactory();
+  private static final EhcacheModuleFactory factory = new EhcacheModuleFactory();
 
   @Test
   void shouldBuildJavaConfigurationModule() {