thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsirois <...@git.apache.org>
Subject [GitHub] thrift pull request #1081: THRIFT-3854 add a way in java to clear TFramedTra...
Date Thu, 26 Jan 2017 20:48:49 GMT
Github user jsirois commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1081#discussion_r98087986
  
    --- Diff: lib/java/src/org/apache/thrift/transport/TFastFramedTransport.java ---
    @@ -164,6 +166,10 @@ public void consumeBuffer(int len) {
         readBuffer.consumeBuffer(len);
       }
     
    +  public void clear() {
    +    readBuffer = new AutoExpandingBufferReadTransport(initialBufferCapacity, 1.5);
    --- End diff --
    
    It would be nice to share the initialization code on line 110 above in the constructor
- consider factoring out a factory or calling reset from the constructor to initialize `readBuffer`
for the 1st time.


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

Mime
View raw message