Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !9113

[cleanup] erefactor/EclipseJdt - Use primitive parse methods instead of wrapper

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/cal101/erefactor/master/1/jdt/jdt-ParsePrimitiveCleanUp into master 4 years ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 18

Created by: cal101

EclipseJdt cleanup 'ParsePrimitive' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php For erefactor see https://github.com/cal101/erefactor

@OpenAPITools/generator-core-team

Compare
  • master (base)

and
  • latest version
    dd2f21b2
    1 commit, 2 years ago

18 files
+ 65
- 65

    Preferences

    File browser
    Compare changes
modules/openap‎i-generator/src‎
main/java/org/ope‎napitools/codegen‎
lang‎uages‎
AbstractJava‎Codegen.java‎ +8 -8
AbstractPythonConnex‎ionServerCodegen.java‎ +2 -2
CSharpNetCoreCl‎ientCodegen.java‎ +1 -1
ElmClientC‎odegen.java‎ +1 -1
GoClientCo‎degen.java‎ +1 -1
JavaClientC‎odegen.java‎ +10 -10
JavaJAXRSSpecSe‎rverCodegen.java‎ +5 -5
JavaPKMSTServ‎erCodegen.java‎ +3 -3
KotlinClient‎Codegen.java‎ +4 -4
KotlinSpringSer‎verCodegen.java‎ +7 -7
PowerShellClie‎ntCodegen.java‎ +2 -2
PythonLegacyCli‎entCodegen.java‎ +1 -1
RClientCo‎degen.java‎ +1 -1
SpringCod‎egen.java‎ +15 -15
TypeScriptAngular‎ClientCodegen.java‎ +1 -1
TypeScriptNestjsC‎lientCodegen.java‎ +1 -1
ut‎ils‎
ModelUt‎ils.java‎ +1 -1
test/java/org/…‎/codegen/swift5‎
Swift5Optio‎nsTest.java‎ +1 -1
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java
+ 8
- 8
  • View file @ dd2f21b2

  • Edit in single-file editor

  • Open in Web IDE


@@ -275,12 +275,12 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
}
if (additionalProperties.containsKey(SUPPORT_JAVA6)) {
this.setSupportJava6(Boolean.valueOf(additionalProperties.get(SUPPORT_JAVA6).toString()));
this.setSupportJava6(Boolean.parseBoolean(additionalProperties.get(SUPPORT_JAVA6).toString()));
}
additionalProperties.put(SUPPORT_JAVA6, supportJava6);
if (additionalProperties.containsKey(DISABLE_HTML_ESCAPING)) {
this.setDisableHtmlEscaping(Boolean.valueOf(additionalProperties.get(DISABLE_HTML_ESCAPING).toString()));
this.setDisableHtmlEscaping(Boolean.parseBoolean(additionalProperties.get(DISABLE_HTML_ESCAPING).toString()));
}
additionalProperties.put(DISABLE_HTML_ESCAPING, disableHtmlEscaping);
@@ -290,7 +290,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
additionalProperties.put(BOOLEAN_GETTER_PREFIX, booleanGetterPrefix);
if (additionalProperties.containsKey(IGNORE_ANYOF_IN_ENUM)) {
this.setIgnoreAnyOfInEnum(Boolean.valueOf(additionalProperties.get(IGNORE_ANYOF_IN_ENUM).toString()));
this.setIgnoreAnyOfInEnum(Boolean.parseBoolean(additionalProperties.get(IGNORE_ANYOF_IN_ENUM).toString()));
}
additionalProperties.put(IGNORE_ANYOF_IN_ENUM, ignoreAnyOfInEnum);
@@ -427,17 +427,17 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
}
if (additionalProperties.containsKey(CodegenConstants.SERIALIZE_BIG_DECIMAL_AS_STRING)) {
this.setSerializeBigDecimalAsString(Boolean.valueOf(additionalProperties.get(CodegenConstants.SERIALIZE_BIG_DECIMAL_AS_STRING).toString()));
this.setSerializeBigDecimalAsString(Boolean.parseBoolean(additionalProperties.get(CodegenConstants.SERIALIZE_BIG_DECIMAL_AS_STRING).toString()));
}
// need to put back serializableModel (boolean) into additionalProperties as value in additionalProperties is string
additionalProperties.put(CodegenConstants.SERIALIZABLE_MODEL, serializableModel);
if (additionalProperties.containsKey(FULL_JAVA_UTIL)) {
this.setFullJavaUtil(Boolean.valueOf(additionalProperties.get(FULL_JAVA_UTIL).toString()));
this.setFullJavaUtil(Boolean.parseBoolean(additionalProperties.get(FULL_JAVA_UTIL).toString()));
}
if (additionalProperties.containsKey(DISCRIMINATOR_CASE_SENSITIVE)) {
this.setDiscriminatorCaseSensitive(Boolean.valueOf(additionalProperties.get(DISCRIMINATOR_CASE_SENSITIVE).toString()));
this.setDiscriminatorCaseSensitive(Boolean.parseBoolean(additionalProperties.get(DISCRIMINATOR_CASE_SENSITIVE).toString()));
} else {
// By default, the discriminator lookup should be case sensitive. There is nothing in the OpenAPI specification
// that indicates the lookup should be case insensitive. However, some implementations perform
@@ -453,12 +453,12 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
additionalProperties.put("javaUtilPrefix", javaUtilPrefix);
if (additionalProperties.containsKey(WITH_XML)) {
this.setWithXml(Boolean.valueOf(additionalProperties.get(WITH_XML).toString()));
this.setWithXml(Boolean.parseBoolean(additionalProperties.get(WITH_XML).toString()));
}
additionalProperties.put(WITH_XML, withXml);
if (additionalProperties.containsKey(OPENAPI_NULLABLE)) {
this.setOpenApiNullable(Boolean.valueOf(additionalProperties.get(OPENAPI_NULLABLE).toString()));
this.setOpenApiNullable(Boolean.parseBoolean(additionalProperties.get(OPENAPI_NULLABLE).toString()));
}
additionalProperties.put(OPENAPI_NULLABLE, openApiNullable);
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonConnexionServerCodegen.java
+ 2
- 2
  • View file @ dd2f21b2

  • Edit in single-file editor

  • Open in Web IDE


@@ -198,11 +198,11 @@ public abstract class AbstractPythonConnexionServerCodegen extends AbstractPytho
}
public void setFeatureCORS(String val) {
this.featureCORS = Boolean.valueOf(val);
this.featureCORS = Boolean.parseBoolean(val);
}
public void setUseNose(String val) {
this.useNose = Boolean.valueOf(val);
this.useNose = Boolean.parseBoolean(val);
}
public void setPythonSrcRoot(String val) {
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java
+ 1
- 1
  • View file @ dd2f21b2

  • Edit in single-file editor

  • Open in Web IDE


@@ -556,7 +556,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
*/
if (additionalProperties.containsKey(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT)) {
this.setDisallowAdditionalPropertiesIfNotPresent(Boolean.valueOf(additionalProperties
this.setDisallowAdditionalPropertiesIfNotPresent(Boolean.parseBoolean(additionalProperties
.get(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT).toString()));
}
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java
+ 1
- 1
  • View file @ dd2f21b2

  • Edit in single-file editor

  • Open in Web IDE


@@ -420,7 +420,7 @@ public class ElmClientCodegen extends DefaultCodegen implements CodegenConfig {
}
} else if (ModelUtils.isBooleanSchema(p)) {
if (p.getDefault() != null) {
return Boolean.valueOf(p.getDefault().toString()) ? "True" : "False";
return Boolean.parseBoolean(p.getDefault().toString()) ? "True" : "False";
}
} else if (ModelUtils.isNumberSchema(p)) {
if (p.getDefault() != null) {
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java
+ 1
- 1
  • View file @ dd2f21b2

  • Edit in single-file editor

  • Open in Web IDE


@@ -238,7 +238,7 @@ public class GoClientCodegen extends AbstractGoCodegen {
}
if (additionalProperties.containsKey(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT)) {
this.setDisallowAdditionalPropertiesIfNotPresent(Boolean.valueOf(additionalProperties
this.setDisallowAdditionalPropertiesIfNotPresent(Boolean.parseBoolean(additionalProperties
.get(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT).toString()));
}
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
5.1.1
5.1.1 (expired)
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
1
1 participant
Administrator
Reference: OpenAPITools/openapi-generator!9113
Source branch: github/fork/cal101/erefactor/master/1/jdt/jdt-ParsePrimitiveCleanUp

Menu

Explore Projects Groups Snippets