Skip to content

Commit

Permalink
suppress the cast warning in java okhttp-gson client (#20076)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 authored Nov 10, 2024
1 parent 13b11d7 commit 6ff52c7
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ public class ApiClient {
}
{{/dynamicOperations}}
/**
/**
* Formats the specified free-form query parameters to a list of {@code Pair} objects.
*
* @param value The free-form query parameters.
Expand All @@ -1001,6 +1001,7 @@ public class ApiClient {
return params;
}
@SuppressWarnings("unchecked")
final Map<String, Object> valuesMap = (Map<String, Object>) value;
for (Map.Entry<String, Object> entry : valuesMap.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ public List<Pair> parameterToPairs(String collectionFormat, String name, Collect
return params;
}

/**
/**
* Formats the specified free-form query parameters to a list of {@code Pair} objects.
*
* @param value The free-form query parameters.
Expand All @@ -843,6 +843,7 @@ public List<Pair> freeFormParameterToPairs(Object value) {
return params;
}

@SuppressWarnings("unchecked")
final Map<String, Object> valuesMap = (Map<String, Object>) value;

for (Map.Entry<String, Object> entry : valuesMap.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ public List<Pair> parameterToPairs(String collectionFormat, String name, Collect
return params;
}

/**
/**
* Formats the specified free-form query parameters to a list of {@code Pair} objects.
*
* @param value The free-form query parameters.
Expand All @@ -773,6 +773,7 @@ public List<Pair> freeFormParameterToPairs(Object value) {
return params;
}

@SuppressWarnings("unchecked")
final Map<String, Object> valuesMap = (Map<String, Object>) value;

for (Map.Entry<String, Object> entry : valuesMap.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ public List<Pair> parameterToPairs(String collectionFormat, String name, Collect
return params;
}

/**
/**
* Formats the specified free-form query parameters to a list of {@code Pair} objects.
*
* @param value The free-form query parameters.
Expand All @@ -747,6 +747,7 @@ public List<Pair> freeFormParameterToPairs(Object value) {
return params;
}

@SuppressWarnings("unchecked")
final Map<String, Object> valuesMap = (Map<String, Object>) value;

for (Map.Entry<String, Object> entry : valuesMap.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ public List<Pair> parameterToPairs(String collectionFormat, String name, Collect
return params;
}

/**
/**
* Formats the specified free-form query parameters to a list of {@code Pair} objects.
*
* @param value The free-form query parameters.
Expand All @@ -747,6 +747,7 @@ public List<Pair> freeFormParameterToPairs(Object value) {
return params;
}

@SuppressWarnings("unchecked")
final Map<String, Object> valuesMap = (Map<String, Object>) value;

for (Map.Entry<String, Object> entry : valuesMap.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ public List<Pair> parameterToPairs(String collectionFormat, String name, Collect
return params;
}

/**
/**
* Formats the specified free-form query parameters to a list of {@code Pair} objects.
*
* @param value The free-form query parameters.
Expand All @@ -747,6 +747,7 @@ public List<Pair> freeFormParameterToPairs(Object value) {
return params;
}

@SuppressWarnings("unchecked")
final Map<String, Object> valuesMap = (Map<String, Object>) value;

for (Map.Entry<String, Object> entry : valuesMap.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ public List<Pair> parameterToPairs(String collectionFormat, String name, Collect
return params;
}

/**
/**
* Formats the specified free-form query parameters to a list of {@code Pair} objects.
*
* @param value The free-form query parameters.
Expand All @@ -843,6 +843,7 @@ public List<Pair> freeFormParameterToPairs(Object value) {
return params;
}

@SuppressWarnings("unchecked")
final Map<String, Object> valuesMap = (Map<String, Object>) value;

for (Map.Entry<String, Object> entry : valuesMap.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ public List<Pair> parameterToPairs(String collectionFormat, String name, Collect
return params;
}

/**
/**
* Formats the specified free-form query parameters to a list of {@code Pair} objects.
*
* @param value The free-form query parameters.
Expand All @@ -863,6 +863,7 @@ public List<Pair> freeFormParameterToPairs(Object value) {
return params;
}

@SuppressWarnings("unchecked")
final Map<String, Object> valuesMap = (Map<String, Object>) value;

for (Map.Entry<String, Object> entry : valuesMap.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ public List<Pair> parameterToPairs(Parameter param, Collection value) {
return params;
}

/**
/**
* Formats the specified free-form query parameters to a list of {@code Pair} objects.
*
* @param value The free-form query parameters.
Expand All @@ -848,6 +848,7 @@ public List<Pair> freeFormParameterToPairs(Object value) {
return params;
}

@SuppressWarnings("unchecked")
final Map<String, Object> valuesMap = (Map<String, Object>) value;

for (Map.Entry<String, Object> entry : valuesMap.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ public List<Pair> parameterToPairs(String collectionFormat, String name, Collect
return params;
}

/**
/**
* Formats the specified free-form query parameters to a list of {@code Pair} objects.
*
* @param value The free-form query parameters.
Expand All @@ -843,6 +843,7 @@ public List<Pair> freeFormParameterToPairs(Object value) {
return params;
}

@SuppressWarnings("unchecked")
final Map<String, Object> valuesMap = (Map<String, Object>) value;

for (Map.Entry<String, Object> entry : valuesMap.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ public List<Pair> parameterToPairs(String collectionFormat, String name, Collect
return params;
}

/**
/**
* Formats the specified free-form query parameters to a list of {@code Pair} objects.
*
* @param value The free-form query parameters.
Expand All @@ -846,6 +846,7 @@ public List<Pair> freeFormParameterToPairs(Object value) {
return params;
}

@SuppressWarnings("unchecked")
final Map<String, Object> valuesMap = (Map<String, Object>) value;

for (Map.Entry<String, Object> entry : valuesMap.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ public List<Pair> parameterToPairs(String collectionFormat, String name, Collect
return params;
}

/**
/**
* Formats the specified free-form query parameters to a list of {@code Pair} objects.
*
* @param value The free-form query parameters.
Expand All @@ -849,6 +849,7 @@ public List<Pair> freeFormParameterToPairs(Object value) {
return params;
}

@SuppressWarnings("unchecked")
final Map<String, Object> valuesMap = (Map<String, Object>) value;

for (Map.Entry<String, Object> entry : valuesMap.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ public List<Pair> parameterToPairs(String collectionFormat, String name, Collect
return params;
}

/**
/**
* Formats the specified free-form query parameters to a list of {@code Pair} objects.
*
* @param value The free-form query parameters.
Expand All @@ -843,6 +843,7 @@ public List<Pair> freeFormParameterToPairs(Object value) {
return params;
}

@SuppressWarnings("unchecked")
final Map<String, Object> valuesMap = (Map<String, Object>) value;

for (Map.Entry<String, Object> entry : valuesMap.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ public List<Pair> parameterToPairs(String collectionFormat, String name, Collect
return params;
}

/**
/**
* Formats the specified free-form query parameters to a list of {@code Pair} objects.
*
* @param value The free-form query parameters.
Expand All @@ -843,6 +843,7 @@ public List<Pair> freeFormParameterToPairs(Object value) {
return params;
}

@SuppressWarnings("unchecked")
final Map<String, Object> valuesMap = (Map<String, Object>) value;

for (Map.Entry<String, Object> entry : valuesMap.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ public List<Pair> parameterToPairs(String collectionFormat, String name, Collect
return params;
}

/**
/**
* Formats the specified free-form query parameters to a list of {@code Pair} objects.
*
* @param value The free-form query parameters.
Expand All @@ -917,6 +917,7 @@ public List<Pair> freeFormParameterToPairs(Object value) {
return params;
}

@SuppressWarnings("unchecked")
final Map<String, Object> valuesMap = (Map<String, Object>) value;

for (Map.Entry<String, Object> entry : valuesMap.entrySet()) {
Expand Down

0 comments on commit 6ff52c7

Please sign in to comment.