Polishing: remove use of cast where avoidable
This commit is contained in:
parent
d552105516
commit
9277b47040
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -95,7 +95,7 @@ public class ExceptionHandlingWebHandler extends WebHandlerDecorator {
|
|||
String query = StringUtils.hasText(rawQuery) ? "?" + rawQuery : "";
|
||||
HttpMethod httpMethod = request.getMethod();
|
||||
String description = "HTTP " + httpMethod + " \"" + request.getPath() + query + "\"";
|
||||
return Mono.error(ex).checkpoint(description + " [ExceptionHandlingWebHandler]").cast(Void.class);
|
||||
return Mono.<Void>error(ex).checkpoint(description + " [ExceptionHandlingWebHandler]");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -117,9 +117,8 @@ public class InMemoryWebSessionStore implements WebSessionStore {
|
|||
Instant now = this.clock.instant();
|
||||
this.expiredSessionChecker.checkIfNecessary(now);
|
||||
|
||||
return Mono.fromSupplier(() -> new InMemoryWebSession(now))
|
||||
.subscribeOn(Schedulers.boundedElastic())
|
||||
.cast(WebSession.class);
|
||||
return Mono.<WebSession>fromSupplier(() -> new InMemoryWebSession(now))
|
||||
.subscribeOn(Schedulers.boundedElastic());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue