bookkeeper-distributedlog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leighst <>
Subject [GitHub] incubator-distributedlog pull request #21: DL-45: DL should allow ByteBuffer...
Date Fri, 18 Nov 2016 15:42:27 GMT
Github user leighst commented on a diff in the pull request:
    --- Diff: distributedlog-core/src/main/java/com/twitter/distributedlog/
    @@ -290,7 +290,8 @@ public static InputStream fromInputStream(InputStream src,
             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

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 or file a JIRA ticket
with INFRA.

View raw message