Github user leighst commented on a diff in the pull request:

    
https://github.com/apache/incubator-distributedlog/pull/21#discussion_r88676658
  
    --- Diff: 
distributedlog-core/src/main/java/com/twitter/distributedlog/EnvelopedEntry.java
 ---
    @@ -290,7 +290,8 @@ public static InputStream fromInputStream(InputStream 
src,
             src.reset();
             EnvelopedEntry entry = new EnvelopedEntry(version, statsLogger);
             entry.readFully(new DataInputStream(src));
    -        return new ByteArrayInputStream(entry.getDecompressedPayload());
    +        return new 
ByteArrayInputStream(entry.getDecompressedPayload().array());
    --- End diff --
    
    i think im missing something here, but it seems like a bad idea to use 
direct array access since the payload object could have been initialized with a 
ByteBuffer from anywhere. is this safe?  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to