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

Philip Hamer commented on THRIFT-3946:
--------------------------------------

I believe there is very little difference in performance: 
http://stackoverflow.com/questions/12157300/clone-or-arrays-copyof

I think one could make the argument to use clone() only if the java5 option is 
specified, because copyOf() may be viewed as the more modern approach and any 
performance improvements or other enhancements may be more likely to be applied 
to this API in the future.


> Java 1.5 compatibility broken for binary fields (java5 option)
> --------------------------------------------------------------
>
>                 Key: THRIFT-3946
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3946
>             Project: Thrift
>          Issue Type: Bug
>          Components: Java - Compiler
>    Affects Versions: 0.9.3
>            Reporter: Philip Hamer
>              Labels: java5
>         Attachments: thrift-3946-java5-binary-arrays-copyof.patch
>
>
> For binary fields, even with the java5 option (--gen java:java5), generated 
> code uses "Arrays.copyOf", which is only available in Java 1.6+.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to