Skip to content

Commit

Permalink
Merge pull request #10972 from qmonmert/defconstant
Browse files Browse the repository at this point in the history
Define a constant instead of duplicating this literal properties
  • Loading branch information
murdos authored Sep 24, 2024
2 parents 0775206 + 68a18e0 commit 4e36b0e
Showing 1 changed file with 5 additions and 3 deletions.
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

0 comments on commit 4e36b0e

Please sign in to comment.