Skip to content

Commit 09c070a

Browse files
authored
update test, suppress warnings in java apache client (#14098)
1 parent 743d2cd commit 09c070a

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,8 +782,16 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
782782
}
783783

784784
/**
785-
* Deserialize response content
785+
* Deserialize response body to Java object according to the Content-Type.
786+
*
787+
* @param <T> Type
788+
* @param response Response
789+
* @param valueType Return type
790+
* @return Deserialized object
791+
* @throws ApiException API exception
792+
* @throws IOException IO exception
786793
*/
794+
@SuppressWarnings("unchecked")
787795
public <T> T deserialize(HttpResponse response, TypeReference<T> valueType) throws ApiException, IOException {
788796
if (valueType == null) {
789797
return null;

modules/openapi-generator/src/test/java/org/openapitools/codegen/java/apachehttpclient/ApacheHttpClientCodegenTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/*
22
* Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
3-
* Copyright 2018 SmartBear Software
43
*
54
* Licensed under the Apache License, Version 2.0 (the "License");
65
* you may not use this file except in compliance with the License.

samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,8 +737,16 @@ public HttpEntity serialize(Object obj, Map<String, Object> formParams, ContentT
737737
}
738738

739739
/**
740-
* Deserialize response content
740+
* Deserialize response body to Java object according to the Content-Type.
741+
*
742+
* @param <T> Type
743+
* @param response Response
744+
* @param valueType Return type
745+
* @return Deserialized object
746+
* @throws ApiException API exception
747+
* @throws IOException IO exception
741748
*/
749+
@SuppressWarnings("unchecked")
742750
public <T> T deserialize(HttpResponse response, TypeReference<T> valueType) throws ApiException, IOException {
743751
if (valueType == null) {
744752
return null;

0 commit comments

Comments
 (0)