diff --git a/modules/openapi-generator/src/main/resources/Java/JSON.mustache b/modules/openapi-generator/src/main/resources/Java/JSON.mustache index b951c3c555db..723ea79f16e4 100644 --- a/modules/openapi-generator/src/main/resources/Java/JSON.mustache +++ b/modules/openapi-generator/src/main/resources/Java/JSON.mustache @@ -69,7 +69,7 @@ public class JSON { .registerTypeSelector({{classname}}.class, new TypeSelector() { @Override public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); + Map classByDiscriminatorValue = new HashMap(); {{#mappedModels}} classByDiscriminatorValue.put("{{mappingName}}".toUpperCase(Locale.ROOT), {{modelName}}.class); {{/mappedModels}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache index c11b4ab127d7..788d416e0482 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache @@ -40,6 +40,19 @@ + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + true + 128m + 512m + + -Xlint:all + + + org.apache.maven.plugins maven-enforcer-plugin diff --git a/modules/openapi-generator/src/main/resources/Java/pom.mustache b/modules/openapi-generator/src/main/resources/Java/pom.mustache index dd95ac7554ee..28dfab1f2575 100644 --- a/modules/openapi-generator/src/main/resources/Java/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pom.mustache @@ -40,6 +40,20 @@ + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + true + 128m + 512m + + -Xlint:all + + + + org.apache.maven.plugins maven-enforcer-plugin diff --git a/samples/client/petstore/java/jersey1/pom.xml b/samples/client/petstore/java/jersey1/pom.xml index 407d9056d9c1..9cf21702ab49 100644 --- a/samples/client/petstore/java/jersey1/pom.xml +++ b/samples/client/petstore/java/jersey1/pom.xml @@ -33,6 +33,20 @@ + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + true + 128m + 512m + + -Xlint:all + + + + org.apache.maven.plugins maven-enforcer-plugin diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml index d43fd33d990f..e173a9dce40a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml @@ -33,6 +33,19 @@ + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + true + 128m + 512m + + -Xlint:all + + + org.apache.maven.plugins maven-enforcer-plugin diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/JSON.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/JSON.java index 3f214bf1fbf4..a745ed9fd89a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/JSON.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/JSON.java @@ -55,7 +55,7 @@ public static GsonBuilder createGson() { .registerTypeSelector(Animal.class, new TypeSelector() { @Override public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); + Map classByDiscriminatorValue = new HashMap(); classByDiscriminatorValue.put("Dog".toUpperCase(Locale.ROOT), Dog.class); classByDiscriminatorValue.put("Cat".toUpperCase(Locale.ROOT), Cat.class); classByDiscriminatorValue.put("BigCat".toUpperCase(Locale.ROOT), BigCat.class); diff --git a/samples/client/petstore/java/okhttp-gson/pom.xml b/samples/client/petstore/java/okhttp-gson/pom.xml index 4e40e0913c4e..d40436a6a306 100644 --- a/samples/client/petstore/java/okhttp-gson/pom.xml +++ b/samples/client/petstore/java/okhttp-gson/pom.xml @@ -33,6 +33,19 @@ + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + true + 128m + 512m + + -Xlint:all + + + org.apache.maven.plugins maven-enforcer-plugin diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/JSON.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/JSON.java index 3f214bf1fbf4..a745ed9fd89a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/JSON.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/JSON.java @@ -55,7 +55,7 @@ public static GsonBuilder createGson() { .registerTypeSelector(Animal.class, new TypeSelector() { @Override public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); + Map classByDiscriminatorValue = new HashMap(); classByDiscriminatorValue.put("Dog".toUpperCase(Locale.ROOT), Dog.class); classByDiscriminatorValue.put("Cat".toUpperCase(Locale.ROOT), Cat.class); classByDiscriminatorValue.put("BigCat".toUpperCase(Locale.ROOT), BigCat.class); diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/JSON.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/JSON.java index 3f214bf1fbf4..a745ed9fd89a 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/JSON.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/JSON.java @@ -55,7 +55,7 @@ public static GsonBuilder createGson() { .registerTypeSelector(Animal.class, new TypeSelector() { @Override public Class getClassForElement(JsonElement readElement) { - Map classByDiscriminatorValue = new HashMap(); + Map classByDiscriminatorValue = new HashMap(); classByDiscriminatorValue.put("Dog".toUpperCase(Locale.ROOT), Dog.class); classByDiscriminatorValue.put("Cat".toUpperCase(Locale.ROOT), Cat.class); classByDiscriminatorValue.put("BigCat".toUpperCase(Locale.ROOT), BigCat.class);