Change ServerRequest.attribute(String) to return Object

This commit changes `ServerRequest.attribute(String)`` to return
`Optional<Object>` instead of `Optional<T>`, where `T` was infered
from a type parameter.
This commit is contained in:
Arjen Poutsma
2017-07-11 11:24:29 +02:00
parent dfcc9af938
commit e11bb17aa6
6 changed files with 11 additions and 21 deletions

View File

@@ -156,12 +156,6 @@ public class MockServerRequest implements ServerRequest {
return (Flux<S>) this.body;
}
@SuppressWarnings("unchecked")
@Override
public <S> Optional<S> attribute(String name) {
return Optional.ofNullable((S) this.attributes.get(name));
}
@Override
public Map<String, Object> attributes() {
return this.attributes;