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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user