[
https://issues.apache.org/jira/browse/AVRO-1869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15352291#comment-15352291
]
ASF GitHub Bot commented on AVRO-1869:
--------------------------------------
GitHub user rdblue opened a pull request:
https://github.com/apache/avro/pull/102
AVRO-1869: Java: Fix Decimal conversion from ByteBuffer.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rdblue/avro AVRO-1869-fix-bytebuffer-decimal
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/avro/pull/102.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #102
----
commit e3ba235de4f4ebb458efc93586d5ae7eceaca1bd
Author: Ryan Blue <[email protected]>
Date: 2016-06-28T03:37:56Z
AVRO-1869: Java: Fix Decimal conversion from ByteBuffer.
----
> Decimal conversion from ByteBuffer ignores buffer position and limit
> --------------------------------------------------------------------
>
> Key: AVRO-1869
> URL: https://issues.apache.org/jira/browse/AVRO-1869
> Project: Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.8.0, 1.8.1
> Reporter: Ryan Blue
> Assignee: Ryan Blue
> Fix For: 1.8.2
>
>
> The decimal conversion from a ByteBuffer currently copies the buffer contents
> into an array, but then calls {{array}} on the buffer and uses the buffer's
> internal array rather than the copied bytes. The result is that the
> constructed Decimal value uses whatever the buffer contained without using
> its position or limit.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)