You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/01/29 09:32:00 UTC
[jira] [Commented] (AVRO-2309) Conversions.java - Use JDK Array
Manipulations
[ https://issues.apache.org/jira/browse/AVRO-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16754781#comment-16754781 ]
ASF subversion and git services commented on AVRO-2309:
-------------------------------------------------------
Commit bcc79e90540f55dc9e1dd34da7a1f5901ee22b2a in avro's branch refs/heads/master from Beluga Behr
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=bcc79e9 ]
AVRO-2309: Conversions.java - Use JDK Array Manipulations
> Conversions.java - Use JDK Array Manipulations
> ----------------------------------------------
>
> Key: AVRO-2309
> URL: https://issues.apache.org/jira/browse/AVRO-2309
> Project: Apache Avro
> Issue Type: Improvement
> Reporter: BELUGA BEHR
> Assignee: BELUGA BEHR
> Priority: Trivial
>
> {code:java|title=Conversions.java}
> for (int i = 0; i < bytes.length; i += 1) {
> if (i < offset) {
> bytes[i] = fillByte;
> } else {
> bytes[i] = unscaled[i - offset];
> }
> }
> {code}
> Improve readability with {{Arrays.fill}} method to fill the first {{offset}} bytes and then copy over the remaining.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)