Fix unchecked conversion (#10246)

* Fix unchecked conversion

Update restttemplate and webclient templates to use <>-operator.
Also update samples.

* Update samples
This commit is contained in:
Thomas Zeeman 2021-08-25 04:09:53 +02:00 committed by GitHub
parent cab2244646
commit f2b50faeec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

@ -671,7 +671,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
public <T> ResponseEntity<T> invokeAPI(String path, HttpMethod method, Map<String, Object> pathParams, MultiValueMap<String, String> queryParams, Object body, HttpHeaders headerParams, MultiValueMap<String, String> cookieParams, MultiValueMap<String, Object> formParams, List<MediaType> accept, MediaType contentType, String[] authNames, ParameterizedTypeReference<T> returnType) throws RestClientException {
updateParamsForAuth(authNames, queryParams, headerParams, cookieParams);
Map<String,Object> uriParams = new HashMap();
Map<String,Object> uriParams = new HashMap<>();
uriParams.putAll(pathParams);
String finalUri = path;

View File

@ -654,7 +654,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
final UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(basePath).path(path);
String finalUri = builder.build(false).toUriString();
Map<String, Object> uriParams = new HashMap();
Map<String, Object> uriParams = new HashMap<>();
uriParams.putAll(pathParams);
if (queryParams != null && !queryParams.isEmpty()) {

View File

@ -627,7 +627,7 @@ public class ApiClient extends JavaTimeFormatter {
public <T> ResponseEntity<T> invokeAPI(String path, HttpMethod method, Map<String, Object> pathParams, MultiValueMap<String, String> queryParams, Object body, HttpHeaders headerParams, MultiValueMap<String, String> cookieParams, MultiValueMap<String, Object> formParams, List<MediaType> accept, MediaType contentType, String[] authNames, ParameterizedTypeReference<T> returnType) throws RestClientException {
updateParamsForAuth(authNames, queryParams, headerParams, cookieParams);
Map<String,Object> uriParams = new HashMap();
Map<String,Object> uriParams = new HashMap<>();
uriParams.putAll(pathParams);
String finalUri = path;

View File

@ -622,7 +622,7 @@ public class ApiClient extends JavaTimeFormatter {
public <T> ResponseEntity<T> invokeAPI(String path, HttpMethod method, Map<String, Object> pathParams, MultiValueMap<String, String> queryParams, Object body, HttpHeaders headerParams, MultiValueMap<String, String> cookieParams, MultiValueMap<String, Object> formParams, List<MediaType> accept, MediaType contentType, String[] authNames, ParameterizedTypeReference<T> returnType) throws RestClientException {
updateParamsForAuth(authNames, queryParams, headerParams, cookieParams);
Map<String,Object> uriParams = new HashMap();
Map<String,Object> uriParams = new HashMap<>();
uriParams.putAll(pathParams);
String finalUri = path;

View File

@ -620,7 +620,7 @@ public class ApiClient extends JavaTimeFormatter {
final UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(basePath).path(path);
String finalUri = builder.build(false).toUriString();
Map<String, Object> uriParams = new HashMap();
Map<String, Object> uriParams = new HashMap<>();
uriParams.putAll(pathParams);
if (queryParams != null && !queryParams.isEmpty()) {

View File

@ -641,7 +641,7 @@ public class ApiClient extends JavaTimeFormatter {
final UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(basePath).path(path);
String finalUri = builder.build(false).toUriString();
Map<String, Object> uriParams = new HashMap();
Map<String, Object> uriParams = new HashMap<>();
uriParams.putAll(pathParams);
if (queryParams != null && !queryParams.isEmpty()) {