From 68a18e05fc6380d1b9dc231e74cda1290c209486 Mon Sep 17 00:00:00 2001 From: Quentin Date: Tue, 24 Sep 2024 21:45:42 +0200 Subject: [PATCH] Define a constant instead of duplicating this literal properties --- .../domain/FrontendJavaBuildToolModuleFactory.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/tech/jhipster/lite/generator/server/javatool/frontendmaven/domain/FrontendJavaBuildToolModuleFactory.java b/src/main/java/tech/jhipster/lite/generator/server/javatool/frontendmaven/domain/FrontendJavaBuildToolModuleFactory.java index a0b89ad59e1..058508cb048 100644 --- a/src/main/java/tech/jhipster/lite/generator/server/javatool/frontendmaven/domain/FrontendJavaBuildToolModuleFactory.java +++ b/src/main/java/tech/jhipster/lite/generator/server/javatool/frontendmaven/domain/FrontendJavaBuildToolModuleFactory.java @@ -17,6 +17,8 @@ public class FrontendJavaBuildToolModuleFactory { private static final String PACKAGE_INFO = "package-info.java"; + private static final String PROPERTIES_FIELD = "properties"; + private static final JHipsterSource SOURCE = from("server/springboot/mvc/frontend"); private static final String REDIRECTION = "wire/frontend"; @@ -29,7 +31,7 @@ public FrontendJavaBuildToolModuleFactory(NpmVersions npmVersions) { } public JHipsterModule buildFrontendMavenModule(JHipsterModuleProperties properties) { - Assert.notNull("properties", properties); + Assert.notNull(PROPERTIES_FIELD, properties); //@formatter:off return commonModuleFiles(properties) @@ -45,7 +47,7 @@ public JHipsterModule buildFrontendMavenModule(JHipsterModuleProperties properti } public JHipsterModule buildFrontendMavenCacheModule(JHipsterModuleProperties properties) { - Assert.notNull("properties", properties); + Assert.notNull(PROPERTIES_FIELD, properties); //@formatter:off return moduleBuilder(properties) @@ -199,7 +201,7 @@ public JHipsterModule buildFrontendGradleModule(JHipsterModuleProperties propert } private static JHipsterModuleBuilder commonModuleFiles(JHipsterModuleProperties properties) { - Assert.notNull("properties", properties); + Assert.notNull(PROPERTIES_FIELD, properties); String packagePath = properties.packagePath();