Return-Path: X-Original-To: apmail-avro-dev-archive@www.apache.org Delivered-To: apmail-avro-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8481A10D9A for ; Wed, 11 Jun 2014 20:38:05 +0000 (UTC) Received: (qmail 24345 invoked by uid 500); 11 Jun 2014 20:38:05 -0000 Delivered-To: apmail-avro-dev-archive@avro.apache.org Received: (qmail 24163 invoked by uid 500); 11 Jun 2014 20:38:02 -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 24152 invoked by uid 99); 11 Jun 2014 20:38:02 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jun 2014 20:38:02 +0000 Date: Wed, 11 Jun 2014 20:38:02 +0000 (UTC) From: "Hudson (JIRA)" To: dev@avro.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AVRO-1470) Perl API boolean type misencoded MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AVRO-1470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14028354#comment-14028354 ] Hudson commented on AVRO-1470: ------------------------------ SUCCESS: Integrated in AvroJava #458 (See [https://builds.apache.org/job/AvroJava/458/]) AVRO-1470. Perl: Fix encoding of boolean values. Contributed by John Karp. (cutting: rev 1602002) * /avro/trunk/CHANGES.txt * /avro/trunk/lang/perl/lib/Avro/BinaryEncoder.pm * /avro/trunk/lang/perl/lib/Avro/Schema.pm * /avro/trunk/lang/perl/t/02_bin_encode.t > Perl API boolean type misencoded > -------------------------------- > > Key: AVRO-1470 > URL: https://issues.apache.org/jira/browse/AVRO-1470 > Project: Avro > Issue Type: Bug > Components: perl > Reporter: John Karp > Assignee: John Karp > Fix For: 1.7.7 > > Attachments: AVRO-1470.patch, AVRO-1470.patch > > > The boolean serialization is incorrect, as these new unit tests would indicate: > {noformat} > primitive_ok boolean => 0, "\x0"; > primitive_ok boolean => 1, "\x1"; > {noformat} > When run they print: > {noformat} > # Failed test 'primitive boolean encoded correctly' > # at t/02_bin_encode.t line 40. > # got: '30' > # expected: '00' > # Failed test 'primitive boolean encoded correctly' > # at t/02_bin_encode.t line 40. > # got: '31' > # expected: '01' > {noformat} > Secondly, when evaluating whether a 'boolean' branch should be taken in a union, the check for boolean-ness of the data is being done incorrectly, matching a regular expression against the wrong variable. -- This message was sent by Atlassian JIRA (v6.2#6252)