armeria
armeria copied to clipboard
Consider changing the type of `Unwrappable.unwrap`
Currently, Unwrappable#unwrap
has the following method signature.
https://github.com/line/armeria/blob/88e8d3e6bf7cd204af60166e49c36c8f18e2ea4e/core/src/main/java/com/linecorp/armeria/common/util/Unwrappable.java#L87-L89
However, @ikhoon made a good point that although the return type is Unwrappable
, the object can't really be unwrapped.
We may want to consider modifying the return type to Object
default Object unwrap() {
return this;
}
default Object unwrapAll() {
return this;
}
Note: unwrapAll
and unwrap
return types are inconsistent until 2.0.0
https://github.com/line/armeria/pull/4338#discussion_r923119208