adoroszlai opened a new pull request, #5638:
URL: https://github.com/apache/ozone/pull/5638

   ## What changes were proposed in this pull request?
   
   Fix `Return value of ... ignored, but method has no side effect` warnings in 
`CodecBuffer`.
   
   Examples:
   
https://github.com/vtutrinov/ozone/actions/runs/6655766005/job/18086771096#step:7:11
   
https://github.com/xichen01/ozone/actions/runs/6925852588/job/18837148517#step:7:11
   
   The methods being called do have side effects, they return the same buffer 
only for convenience.  `CodecBuffer.buf` is `final`, we cannot update it to the 
buffer returned even if it's another instance.
   
   `assertSame` call is added to make use of the return value, and also to 
alert if the implementation is changed to return any other instance.
   
   https://issues.apache.org/jira/browse/HDDS-9731
   
   ## How was this patch tested?
   
    * Checked out 
https://github.com/xichen01/ozone/commit/1589e17d0ab64d12064050c73a75bfba52b62132
    * Ran `findbugs.sh` locally to reproduce the problem
    * Applied this patch
    * Ran `findbugs.sh` again to verify the warnings were no longer reported
   
   CI:
   https://github.com/adoroszlai/ozone/actions/runs/6935777427


-- 
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