[Java] Use Fully Qualified Name for java.util.Locale in Generated Classes (#22342)

* Remove Imports of `Locale` from all `model.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `modelEnum.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `oneof_model.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `api.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `anyof_model.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `pojo.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `ApiClient.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `ApiKeyAuth.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `JSON.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `HttpSignatureAuth.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `Play24CallFactory.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `Play25CallFactory.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `Play26CallFactory.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `apiException.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `clientConfiguration.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `RequestFactory.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `httpLoggingFilter.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `securityApiUtils.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Remove Imports of `Locale` from all `validatorUtils.mustache`-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Use `Locale`-class Via Fully Qualified Name

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Generated 'sample'-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Revert Changes

* Inline `Locale` Imports

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Generated 'source' Files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update `kotlin-spring/model.mustache`

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Generated 'sample' Files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Generated 'sample' Files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Generated 'java-feign-hc5' Sample Files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Generated Sample Files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Generated Kotlin Sample Files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

---------

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>
This commit is contained in:
Christopher Molin
2025-12-17 08:15:32 +01:00
committed by GitHub
parent e1edb9e645
commit 149fdcb61f
2627 changed files with 2442 additions and 5489 deletions

View File

@@ -18,7 +18,6 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Locale;
import org.openapitools.client.JSON;
@@ -87,7 +86,7 @@ public class Category {
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
if (jsonElement == null) {
if (!Category.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Category is not found in the empty JSON string", Category.openapiRequiredFields.toString()));
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Category is not found in the empty JSON string", Category.openapiRequiredFields.toString()));
}
}
@@ -95,7 +94,7 @@ public class Category {
// check to see if the JSON string contains additional fields
for (Map.Entry<String, JsonElement> entry : entries) {
if (!Category.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Category` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Category` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
}

View File

@@ -18,7 +18,6 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Locale;
import org.openapitools.client.JSON;
@@ -87,7 +86,7 @@ public class ModelApiResponse {
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
if (jsonElement == null) {
if (!ModelApiResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ModelApiResponse is not found in the empty JSON string", ModelApiResponse.openapiRequiredFields.toString()));
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in ModelApiResponse is not found in the empty JSON string", ModelApiResponse.openapiRequiredFields.toString()));
}
}
@@ -95,7 +94,7 @@ public class ModelApiResponse {
// check to see if the JSON string contains additional fields
for (Map.Entry<String, JsonElement> entry : entries) {
if (!ModelApiResponse.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ModelApiResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `ModelApiResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
}

View File

@@ -18,7 +18,6 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Locale;
import org.openapitools.client.JSON;
@@ -87,7 +86,7 @@ public class Order {
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
if (jsonElement == null) {
if (!Order.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Order is not found in the empty JSON string", Order.openapiRequiredFields.toString()));
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Order is not found in the empty JSON string", Order.openapiRequiredFields.toString()));
}
}
@@ -95,7 +94,7 @@ public class Order {
// check to see if the JSON string contains additional fields
for (Map.Entry<String, JsonElement> entry : entries) {
if (!Order.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Order` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Order` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
}

View File

@@ -18,7 +18,6 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Locale;
import org.openapitools.client.JSON;
@@ -87,7 +86,7 @@ public class Pet {
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
if (jsonElement == null) {
if (!Pet.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Pet is not found in the empty JSON string", Pet.openapiRequiredFields.toString()));
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Pet is not found in the empty JSON string", Pet.openapiRequiredFields.toString()));
}
}
@@ -95,7 +94,7 @@ public class Pet {
// check to see if the JSON string contains additional fields
for (Map.Entry<String, JsonElement> entry : entries) {
if (!Pet.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Pet` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Pet` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
}

View File

@@ -18,7 +18,6 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Locale;
import org.openapitools.client.JSON;
@@ -87,7 +86,7 @@ public class Tag {
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
if (jsonElement == null) {
if (!Tag.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Tag is not found in the empty JSON string", Tag.openapiRequiredFields.toString()));
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in Tag is not found in the empty JSON string", Tag.openapiRequiredFields.toString()));
}
}
@@ -95,7 +94,7 @@ public class Tag {
// check to see if the JSON string contains additional fields
for (Map.Entry<String, JsonElement> entry : entries) {
if (!Tag.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Tag` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `Tag` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
}

View File

@@ -18,7 +18,6 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Locale;
import org.openapitools.client.JSON;
@@ -87,7 +86,7 @@ public class User {
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
if (jsonElement == null) {
if (!User.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in User is not found in the empty JSON string", User.openapiRequiredFields.toString()));
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in User is not found in the empty JSON string", User.openapiRequiredFields.toString()));
}
}
@@ -95,7 +94,7 @@ public class User {
// check to see if the JSON string contains additional fields
for (Map.Entry<String, JsonElement> entry : entries) {
if (!User.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` in the JSON string is not defined in the `User` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `User` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
}