DifferentSC commented on a change in pull request #206: [NEMO-369] 
DirectByteArrayOutputStream usage refactoring
URL: https://github.com/apache/incubator-nemo/pull/206#discussion_r268944226
 
 

 ##########
 File path: 
common/src/main/java/org/apache/nemo/common/DirectByteArrayOutputStream.java
 ##########
 @@ -42,16 +43,11 @@ public DirectByteArrayOutputStream(final int size) {
   }
 
   /**
+   * Note that serializedBytes include invalid bytes.
+   * So we have to use it with the actualLength whenever needed
 
 Review comment:
   @sanha It was obtained by `getCount()` method in 
`DirectByteArrayOutputStream` before, but it turns out that `getCount()` is no 
different from `size()` except that `size()` is wrapped with `synchronized`. 
So, using `getCount()` to figure out `actualLength` is no longer necessary.
   
   @hy00nc +1 for adding a comment that the `actualLength` could be get from 
`.size()` method.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to