BitoAgent commented on code in PR #13786:
URL: https://github.com/apache/dubbo/pull/13786#discussion_r1552428992


##########
dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/message/StreamingDecoder.java:
##########
@@ -37,13 +37,6 @@ interface FragmentListener {
          */
         void onFragmentMessage(InputStream rawMessage);
 
-        /**
-         * @param rawMessage raw message
-         */
-        default void onFragmentMessage(InputStream dataHeader, InputStream 
rawMessage) {
-            onFragmentMessage(rawMessage);
-        }
-
         default void onClose() {}

Review Comment:
    **Issue**: Removing the default implementation of 'onFragmentMessage' that 
accepts two 'InputStream' arguments simplifies the interface but requires all 
implementers to handle stream merging themselves if needed. <br> **Fix**: 
Ensure that all current and future implementations of 'StreamingDecoder' are 
aware of this change and properly implement message fragment handling according 
to their specific requirements. <br> **Code Suggestion**: 
    ```
    Ensure that all current and future implementations of 'StreamingDecoder' 
properly implement message fragment handling. This involves overriding the 
'onFragmentMessage' method to handle the merging of InputStreams if necessary. 
For guidance, refer to the updated interface definition and consider the 
implications of stream management in your specific context.
    ```
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to