thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (THRIFT-4499) Remove Magic Number In TFIleTransport
Date Fri, 05 Oct 2018 21:06:00 GMT

    [ https://issues.apache.org/jira/browse/THRIFT-4499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16640341#comment-16640341
] 

ASF GitHub Bot commented on THRIFT-4499:
----------------------------------------

jeking3 closed pull request #1607: THRIFT-4499: Remove Magic Number In TFIleTransport (BELUGA
BEHR)
URL: https://github.com/apache/thrift/pull/1607
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/lib/java/src/org/apache/thrift/transport/TFileTransport.java b/lib/java/src/org/apache/thrift/transport/TFileTransport.java
index 915fa7328f..c011c52a79 100644
--- a/lib/java/src/org/apache/thrift/transport/TFileTransport.java
+++ b/lib/java/src/org/apache/thrift/transport/TFileTransport.java
@@ -366,7 +366,7 @@ public void open() throws TTransportException {
       currentEvent_ = new Event(new byte [256]);
 
       if(!readOnly_)
-        outputStream_ = new BufferedOutputStream(inputFile_.getOutputStream(), 8192);
+        outputStream_ = new BufferedOutputStream(inputFile_.getOutputStream());
     } catch (IOException iox) {
       throw new TTransportException(TTransportException.NOT_OPEN, iox);
     }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Remove Magic Number In TFIleTransport
> -------------------------------------
>
>                 Key: THRIFT-4499
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4499
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>    Affects Versions: 0.11.0
>            Reporter: BELUGA BEHR
>            Assignee: James E. King III
>            Priority: Trivial
>             Fix For: 0.12.0
>
>         Attachments: THRIFT-4499.1.patch
>
>
> Here, the buffer is hard-coded to 8192 (which matches the default value on most JDK implementations).
You may wish to remove this magic number and let the JDK decide the size.
> https://github.com/apache/thrift/blob/19baeefd8c38d62085891d7956349601f79448b3/lib/java/src/org/apache/thrift/transport/TFileTransport.java#L369



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message