Skip to content

Commit

Permalink
chore: move new method to comply with checkstyle rules
Browse files Browse the repository at this point in the history
  • Loading branch information
CarstenWickner committed Nov 12, 2023
1 parent ca5c046 commit a584e24
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,19 @@ private void generateSchema(String classOrPackageName, boolean targetPackage) th
}
}

/**
* Generate the JSON schema for the given className.
*
* @param schemaClass The class for which the schema is to be generated
* @throws MojoExecutionException In case of problems
*/
private void generateSchema(Class<?> schemaClass) throws MojoExecutionException {
JsonNode jsonSchema = getGenerator().generateSchema(schemaClass);
File file = getSchemaFile(schemaClass);
this.getLog().info("- Writing schema to file: " + file);
this.writeToFile(jsonSchema, file);
}

private void logForNoClassesMatchingFilter(String classOrPackageName) throws MojoExecutionException {
StringBuilder message = new StringBuilder("No matching class found for \"")
.append(classOrPackageName)
Expand All @@ -254,19 +267,6 @@ private void logForNoClassesMatchingFilter(String classOrPackageName) throws Moj
this.getLog().warn(message.toString());
}

/**
* Generate the JSON schema for the given className.
*
* @param schemaClass The class for which the schema is to be generated
* @throws MojoExecutionException In case of problems
*/
private void generateSchema(Class<?> schemaClass) throws MojoExecutionException {
JsonNode jsonSchema = getGenerator().generateSchema(schemaClass);
File file = getSchemaFile(schemaClass);
this.getLog().info("- Writing schema to file: " + file);
this.writeToFile(jsonSchema, file);
}

/**
* Get all the names of classes on the classpath.
*
Expand Down

0 comments on commit a584e24

Please sign in to comment.