forked from loafle/openapi-generator-original
Fixing squid:S1488 - Local Variables should not be declared and then immediately returned or thrown
This commit is contained in:
@@ -390,8 +390,7 @@ public class CodegenConfigurator {
|
||||
|
||||
if (isNotEmpty(configFile)) {
|
||||
try {
|
||||
CodegenConfigurator result = Json.mapper().readValue(new File(configFile), CodegenConfigurator.class);
|
||||
return result;
|
||||
return Json.mapper().readValue(new File(configFile), CodegenConfigurator.class);
|
||||
} catch (IOException e) {
|
||||
LOG.error("Unable to deserialize config file: " + configFile, e);
|
||||
}
|
||||
|
||||
@@ -88,10 +88,9 @@ public class ExampleGenerator {
|
||||
} else if (property instanceof ArrayProperty) {
|
||||
Property innerType = ((ArrayProperty) property).getItems();
|
||||
if (innerType != null) {
|
||||
Object[] output = new Object[]{
|
||||
return new Object[]{
|
||||
resolvePropertyToExample(mediaType, innerType, processedModels)
|
||||
};
|
||||
return output;
|
||||
}
|
||||
} else if (property instanceof DateProperty) {
|
||||
return new java.util.Date(System.currentTimeMillis());
|
||||
|
||||
Reference in New Issue
Block a user