Merge pull request #1774 from DevFactory/staging/redundant-field-initializer-fix-2

Redundant Field Initializer
This commit is contained in:
Tony Tam 2015-12-30 19:54:23 -08:00
commit 1e2abbe422
15 changed files with 30 additions and 30 deletions

View File

@ -31,7 +31,7 @@ public class CodegenProperty {
public Double maximum;
public Boolean exclusiveMinimum;
public Boolean exclusiveMaximum;
public Boolean hasMore = null, required = null, secondaryParam = null;
public Boolean hasMore, required, secondaryParam;
public Boolean isPrimitiveType, isContainer, isNotContainer;
public boolean isEnum;
public Boolean isReadOnly = false;

View File

@ -71,9 +71,9 @@ public class DefaultCodegen {
protected List<SupportingFile> supportingFiles = new ArrayList<SupportingFile>();
protected List<CliOption> cliOptions = new ArrayList<CliOption>();
protected boolean skipOverwrite;
protected boolean supportsInheritance = false;
protected boolean supportsInheritance;
protected Map<String, String> supportedLibraries = new LinkedHashMap<String, String>();
protected String library = null;
protected String library;
protected Boolean sortParamsByRequiredFlag = true;
protected Boolean ensureUniqueParams = true;

View File

@ -22,8 +22,8 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
Logger LOGGER = LoggerFactory.getLogger(DefaultGenerator.class);
protected CodegenConfig config;
protected ClientOptInput opts = null;
protected Swagger swagger = null;
protected ClientOptInput opts;
protected Swagger swagger;
@Override
public Generator opts(ClientOptInput opts) {

View File

@ -17,8 +17,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class InlineModelResolver {
private Swagger swagger = null;
private boolean skipMatches = false;
private Swagger swagger;
private boolean skipMatches;
static Logger LOGGER = LoggerFactory.getLogger(InlineModelResolver.class);
Map<String, Model> addedModels = new HashMap<String, Model>();
@ -118,8 +118,8 @@ public class InlineModelResolver {
ap.setItems(new RefProperty(modelName));
addGenerated(modelName, innerModel);
swagger.addDefinition(modelName, innerModel);
}
}
}
}
} else if (property instanceof MapProperty) {
MapProperty mp = (MapProperty) property;

View File

@ -41,8 +41,8 @@ public class CodegenConfigurator {
private String lang;
private String inputSpec;
private String outputDir;
private boolean verbose = false;
private boolean skipOverwrite = false;
private boolean verbose;
private boolean skipOverwrite;
private String templateDir;
private String auth;
private String apiPackage;

View File

@ -33,7 +33,7 @@ public class AsyncScalaClientCodegen extends DefaultCodegen implements CodegenCo
protected String sourceFolder = "src/main/scala";
protected String clientName = "SwaggerClient";
protected String authScheme = "";
protected boolean authPreemptive = false;
protected boolean authPreemptive;
protected boolean asyncHttpClient = !authScheme.isEmpty();
public AsyncScalaClientCodegen() {

View File

@ -26,10 +26,10 @@ public class ClojureClientCodegen extends DefaultCodegen implements CodegenConfi
private static final String PROJECT_LICENSE_URL = "projectLicenseUrl";
private static final String BASE_NAMESPACE = "baseNamespace";
protected String projectName = null;
protected String projectDescription = null;
protected String projectVersion = null;
protected String baseNamespace = null;
protected String projectName;
protected String projectDescription;
protected String projectVersion;
protected String baseNamespace;
protected String sourceFolder = "src";

View File

@ -26,7 +26,7 @@ import java.util.HashSet;
public class FlashClientCodegen extends DefaultCodegen implements CodegenConfig {
protected String packageName = "io.swagger";
protected String packageVersion = null;
protected String packageVersion;
protected String invokerPackage = "io.swagger";
protected String sourceFolder = "src/main/flex";

View File

@ -28,7 +28,7 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
protected String projectFolder = "src" + File.separator + "main";
protected String sourceFolder = projectFolder + File.separator + "java";
protected String localVariablePrefix = "";
protected boolean fullJavaUtil = false;
protected boolean fullJavaUtil;
protected String javaUtilPrefix = "";
protected Boolean serializableModel = false;
protected boolean serializeBigDecimalAsString = false;

View File

@ -40,10 +40,10 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
private static final String PROJECT_VERSION = "projectVersion";
private static final String PROJECT_LICENSE_NAME = "projectLicenseName";
protected String projectName = null;
protected String moduleName = null;
protected String projectDescription = null;
protected String projectVersion = null;
protected String projectName;
protected String moduleName;
protected String projectDescription;
protected String projectVersion;
protected String sourceFolder = "src";
protected String localVariablePrefix = "";

View File

@ -15,8 +15,8 @@ import java.util.HashSet;
import org.apache.commons.lang.StringUtils;
public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig {
protected String packageName = null;
protected String packageVersion = null;
protected String packageName;
protected String packageVersion;
public PythonClientCodegen() {
super();

View File

@ -19,8 +19,8 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
public static final String GEM_NAME = "gemName";
public static final String MODULE_NAME = "moduleName";
public static final String GEM_VERSION = "gemVersion";
protected String gemName = null;
protected String moduleName = null;
protected String gemName;
protected String moduleName;
protected String gemVersion = "1.0.0";
protected String libFolder = "lib";

View File

@ -35,7 +35,7 @@ public class ScalaClientCodegen extends DefaultCodegen implements CodegenConfig
protected String artifactVersion = "1.0.0";
protected String sourceFolder = "src/main/scala";
protected String authScheme = "";
protected boolean authPreemptive = false;
protected boolean authPreemptive;
protected boolean asyncHttpClient = !authScheme.isEmpty();
public ScalaClientCodegen() {

View File

@ -21,8 +21,8 @@ import java.util.Map;
import org.apache.commons.lang.StringUtils;
public class SinatraServerCodegen extends DefaultCodegen implements CodegenConfig {
protected String gemName = null;
protected String moduleName = null;
protected String gemName;
protected String moduleName;
protected String gemVersion = "1.0.0";
protected String libFolder = "lib";

View File

@ -40,7 +40,7 @@ public class SwiftCodegen extends DefaultCodegen implements CodegenConfig {
protected static final String LIBRARY_PROMISE_KIT = "PromiseKit";
protected static final String[] RESPONSE_LIBRARIES = { LIBRARY_PROMISE_KIT };
protected String projectName = "SwaggerClient";
protected boolean unwrapRequired = false;
protected boolean unwrapRequired;
protected String[] responseAs = new String[0];
protected String sourceFolder = "Classes" + File.separator + "Swaggers";
private static final Pattern PATH_PARAM_PATTERN = Pattern.compile("\\{[a-zA-Z_]+\\}");