Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define a constant instead of duplicating this literal properties #10972

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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();

Expand Down