forked from loafle/openapi-generator-original
fix java warnings
Do not impact any feature. Juste correct some Java warnings (static methods, unused imports or parameters...).
This commit is contained in:
@@ -21,6 +21,7 @@ public class SwaggerCodegen {
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Cli.CliBuilder<Runnable> builder = Cli.<Runnable>builder("swagger-codegen-cli")
|
||||
.withDescription("Swagger code generator CLI. More info on swagger.io")
|
||||
.withDefaultCommand(Langs.class)
|
||||
|
||||
@@ -230,15 +230,15 @@ public class Generate implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
private Set<String> createSetFromCsvList(String csvProperty) {
|
||||
private static Set<String> createSetFromCsvList(String csvProperty) {
|
||||
final List<String> values = OptionUtils.splitCommaSeparatedList(csvProperty);
|
||||
return new HashSet<String>(values);
|
||||
}
|
||||
|
||||
private Map createMapFromKeyValuePairs(String commaSeparatedKVPairs) {
|
||||
private static Map<String, String> createMapFromKeyValuePairs(String commaSeparatedKVPairs) {
|
||||
final List<Pair<String, String>> pairs = OptionUtils.parseCommaSeparatedTuples(commaSeparatedKVPairs);
|
||||
|
||||
Map result = new HashMap();
|
||||
Map<String, String> result = new HashMap<String, String>();
|
||||
|
||||
for (Pair<String, String> pair : pairs) {
|
||||
result.put(pair.getLeft(), pair.getRight());
|
||||
|
||||
@@ -93,7 +93,7 @@ public class Meta implements Runnable {
|
||||
* @param data - map with additional params needed to process templates
|
||||
* @return converter object to pass to lambdaj
|
||||
*/
|
||||
private Converter<SupportingFile, File> processFiles(final File targetDir, final Map<String, Object> data) {
|
||||
private static Converter<SupportingFile, File> processFiles(final File targetDir, final Map<String, Object> data) {
|
||||
return new Converter<SupportingFile, File>() {
|
||||
private DefaultGenerator generator = new DefaultGenerator();
|
||||
|
||||
@@ -133,7 +133,7 @@ public class Meta implements Runnable {
|
||||
* @param generator - class with reader getter
|
||||
* @return loader for template
|
||||
*/
|
||||
private Mustache.TemplateLoader loader(final DefaultGenerator generator) {
|
||||
private static Mustache.TemplateLoader loader(final DefaultGenerator generator) {
|
||||
return new Mustache.TemplateLoader() {
|
||||
@Override
|
||||
public Reader getTemplate(String name) {
|
||||
@@ -149,7 +149,7 @@ public class Meta implements Runnable {
|
||||
* @param packageName - package name to convert
|
||||
* @return relative path
|
||||
*/
|
||||
private String asPath(String packageName) {
|
||||
private static String asPath(String packageName) {
|
||||
return packageName.replace(".", File.separator);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user