-
Notifications
You must be signed in to change notification settings - Fork 926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace new DefaultStreamMessage()
to StreamMessage.streaming()
#4717
Replace new DefaultStreamMessage()
to StreamMessage.streaming()
#4717
Conversation
f93df5f
to
c40543e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for cleaning up!
armeria/core/src/main/java/com/linecorp/armeria/common/multipart/MultipartEncoder.java Lines 153 to 161 in ff25d6f
FYI, I found that some classes extends or overrides Also, If we add So I just replace |
Sounds good to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot, @injae-kim !
How about at least adding /**
* Creates a new instance.
*
* @deprecated Use ...
*/
@Deprecated
public DefaultStreamMessage() {...} |
If we add @minwoox , is it okay? then I'll add |
I think it's okay and we should so that users no more use the constructor of
I realized that we also need to deprecate those APIs. Users should use |
0717db4
to
bffad77
Compare
📌 |
bffad77
to
ffff582
Compare
ffff582
to
a378fa7
Compare
@@ -26,7 +26,7 @@ | |||
import com.linecorp.armeria.internal.common.stream.AbortingSubscriber; | |||
import com.linecorp.armeria.internal.common.stream.StreamMessageUtil; | |||
|
|||
abstract class AbstractStreamMessageWriter<T> extends CancellableStreamMessage<T> implements StreamWriter<T> { | |||
abstract class AbstractStreamWriter<T> extends CancellableStreamMessage<T> implements StreamWriter<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, it seems like the file name isn't changed. 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
armeria/core/src/main/java/com/linecorp/armeria/common/stream/AbstractStreamMessageWriter.java
Line 29 in e7b02d4
abstract class AbstractStreamMessageWriter<T> extends CancellableStreamMessage<T> implements StreamWriter<T> { |
oh on latest master
branch, still AbstractStreamMessageWriter
.
It's better to rename AbstractStreamMessageWriter
-> AbstractStreamWriter
?
(cause we rename StreamMessageWrtier
-> StreamWriter
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or.. I don't rename AbstractStreamMessageWriter
in previous PR cause it implements CancellableStreamMessage
+ StreamWriter
😅
// Delegate to coroutine's exception handling mechanism, | ||
// which ignores CancellationException. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Delegate to coroutine's exception handling mechanism, | |
// which ignores CancellationException. |
We don't delegate anymore so let's just remove this comment. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ updated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot, @injae-kim for cleaning this up!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @injae-kim ! 🙇 👍 🙇
* @deprecated Use {@link HttpRequest#streaming(RequestHeaders)} instead. | ||
*/ | ||
@Deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is in internal
. Do we need @Deprecated
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, no we don't need it. Let me revert it. 😓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for catching 🙇
Thanks for cleaning up! 🚀🚀 |
Related PR #4696, Issue #4253
Motivation:
StreamMessageWriter
andStreamMessage.streaming()
#4696 (comment)new DefaultStreamMessage()
directly cause we haveStreamMessage.streaming()
insteadModifications:
new DefaultStreamMessage()
toStreamMessage.streaming()
Result:
new DefaultStreamMessage()
more and useStreamMessage.streaming()
instead