Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CD4ED200B9C for ; Mon, 10 Oct 2016 10:10:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CC174160ACA; Mon, 10 Oct 2016 08:10:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3DE8E160AF8 for ; Mon, 10 Oct 2016 10:10:22 +0200 (CEST) Received: (qmail 99598 invoked by uid 500); 10 Oct 2016 08:10:21 -0000 Mailing-List: contact dev-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list dev@avro.apache.org Received: (qmail 99356 invoked by uid 99); 10 Oct 2016 08:10:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Oct 2016 08:10:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B76E52C2A6D for ; Mon, 10 Oct 2016 08:10:20 +0000 (UTC) Date: Mon, 10 Oct 2016 08:10:20 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@avro.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AVRO-1860) DefaultValue() returns Ints for Long fields MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 10 Oct 2016 08:10:23 -0000 [ https://issues.apache.org/jira/browse/AVRO-1860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15561612#comment-15561612 ] ASF GitHub Bot commented on AVRO-1860: -------------------------------------- Github user gszadovszky closed the pull request at: https://github.com/apache/avro/pull/138 > DefaultValue() returns Ints for Long fields > ------------------------------------------- > > Key: AVRO-1860 > URL: https://issues.apache.org/jira/browse/AVRO-1860 > Project: Avro > Issue Type: Bug > Components: java > Affects Versions: 1.8.1 > Reporter: Manuel Rieke > Assignee: Gabor Szadovszky > Fix For: 1.9.0, 1.8.2 > > > I am iterating over the schemas for getting default values for fields. When the type of a field is Long Avro returns INT instead: > field.defaultVal() > -->Field.defaultVal() > -->Jacksonutils.toObject(jsonNode) > -->Jacksonutils.toObject(jsonNode, null) > The Field class already contains the information ("long"), so shouldn't the Field class use Jacksonutils-toObject-Method with schema? Otherwise it is always null and Integer are returned. -- This message was sent by Atlassian JIRA (v6.3.4#6332)