From 6d3a3c1803fb82cf0254d5e06b85e180bf8121c8 Mon Sep 17 00:00:00 2001 From: Iurii Ignatko Date: Tue, 21 Jan 2025 12:15:32 +0100 Subject: [PATCH] Additional [this-escape] warnings fixes --- .../Java/libraries/apache-httpclient/ApiClient.mustache | 2 +- .../src/main/resources/Java/libraries/native/ApiClient.mustache | 2 +- .../src/main/java/org/openapitools/client/ApiClient.java | 2 +- .../native/src/main/java/org/openapitools/client/ApiClient.java | 2 +- .../src/main/java/org/openapitools/client/ApiClient.java | 2 +- .../src/main/java/org/openapitools/client/ApiClient.java | 2 +- .../src/main/java/org/openapitools/client/ApiClient.java | 2 +- .../native/src/main/java/org/openapitools/client/ApiClient.java | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache index 0661db1e0ce8..854d8a6cd9af 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache @@ -444,7 +444,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { * @param userAgent User agent * @return API client */ - public ApiClient setUserAgent(String userAgent) { + public final ApiClient setUserAgent(String userAgent) { addDefaultHeader("User-Agent", userAgent); return this; } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache index 730e975f7390..a8bede35507c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache @@ -207,7 +207,7 @@ public class ApiClient { return HttpClient.newBuilder(); } - public void updateBaseUri(String baseUri) { + public final void updateBaseUri(String baseUri) { URI uri = URI.create(baseUri); scheme = uri.getScheme(); host = uri.getHost(); diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java index 0cb6e8752cf9..790a5abb4bbe 100644 --- a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java @@ -362,7 +362,7 @@ public ApiClient setPassword(String password) { * @param userAgent User agent * @return API client */ - public ApiClient setUserAgent(String userAgent) { + public final ApiClient setUserAgent(String userAgent) { addDefaultHeader("User-Agent", userAgent); return this; } diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ApiClient.java index 96f20b81867f..3d56f0aec841 100644 --- a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ApiClient.java @@ -214,7 +214,7 @@ public static HttpClient.Builder createDefaultHttpClientBuilder() { return HttpClient.newBuilder(); } - public void updateBaseUri(String baseUri) { + public final void updateBaseUri(String baseUri) { URI uri = URI.create(baseUri); scheme = uri.getScheme(); host = uri.getHost(); diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java index e3d2130be93b..6d3f3bbcac87 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java @@ -455,7 +455,7 @@ public ApiClient setAccessToken(String accessToken) { * @param userAgent User agent * @return API client */ - public ApiClient setUserAgent(String userAgent) { + public final ApiClient setUserAgent(String userAgent) { addDefaultHeader("User-Agent", userAgent); return this; } diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java index 261cbe1e06f8..642ff1194ca3 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java @@ -214,7 +214,7 @@ public static HttpClient.Builder createDefaultHttpClientBuilder() { return HttpClient.newBuilder(); } - public void updateBaseUri(String baseUri) { + public final void updateBaseUri(String baseUri) { URI uri = URI.create(baseUri); scheme = uri.getScheme(); host = uri.getHost(); diff --git a/samples/client/petstore/java/native-jakarta/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/native-jakarta/src/main/java/org/openapitools/client/ApiClient.java index 28c477f8407d..6e57722f0337 100644 --- a/samples/client/petstore/java/native-jakarta/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/native-jakarta/src/main/java/org/openapitools/client/ApiClient.java @@ -214,7 +214,7 @@ public static HttpClient.Builder createDefaultHttpClientBuilder() { return HttpClient.newBuilder(); } - public void updateBaseUri(String baseUri) { + public final void updateBaseUri(String baseUri) { URI uri = URI.create(baseUri); scheme = uri.getScheme(); host = uri.getHost(); diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java index 261cbe1e06f8..642ff1194ca3 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java @@ -214,7 +214,7 @@ public static HttpClient.Builder createDefaultHttpClientBuilder() { return HttpClient.newBuilder(); } - public void updateBaseUri(String baseUri) { + public final void updateBaseUri(String baseUri) { URI uri = URI.create(baseUri); scheme = uri.getScheme(); host = uri.getHost();