Remove redundant casts

See gh-12011
This commit is contained in:
igor-suhorukov
2018-02-13 00:42:51 +03:00
committed by Stephane Nicoll
parent 74cede5cdc
commit 71351de694
7 changed files with 7 additions and 10 deletions

View File

@@ -53,7 +53,7 @@ public class ElasticsearchHealthIndicator extends AbstractHealthIndicator {
*/
public ElasticsearchHealthIndicator(Client client, long responseTimeout,
List<String> indices) {
this(client, responseTimeout, (indices == null ? (String[]) null
this(client, responseTimeout, (indices == null ? null
: indices.toArray(new String[indices.size()])));
}

View File

@@ -299,8 +299,7 @@ public abstract class AbstractWebFluxEndpointHandlerMapping
@SuppressWarnings("unchecked")
private Map<String, String> getTemplateVariables(ServerWebExchange exchange) {
return (Map<String, String>) exchange
.getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE);
return exchange.getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE);
}
private Mono<ResponseEntity<Object>> handleResult(Publisher<?> result,