Return-Path: X-Original-To: apmail-avro-commits-archive@www.apache.org Delivered-To: apmail-avro-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A594710CC9 for ; Wed, 28 May 2014 22:26:20 +0000 (UTC) Received: (qmail 65224 invoked by uid 500); 28 May 2014 22:26:20 -0000 Delivered-To: apmail-avro-commits-archive@avro.apache.org Received: (qmail 65190 invoked by uid 500); 28 May 2014 22:26:20 -0000 Mailing-List: contact commits-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 commits@avro.apache.org Received: (qmail 65183 invoked by uid 99); 28 May 2014 22:26:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2014 22:26:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2014 22:26:20 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7427B2388994; Wed, 28 May 2014 22:25:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1598161 - in /avro/trunk: CHANGES.txt lang/java/avro/src/main/java/org/apache/avro/io/parsing/ResolvingGrammarGenerator.java lang/java/avro/src/test/java/org/apache/avro/io/parsing/TestResolvingGrammarGenerator2.java Date: Wed, 28 May 2014 22:25:56 -0000 To: commits@avro.apache.org From: cutting@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140528222556.7427B2388994@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cutting Date: Wed May 28 22:25:55 2014 New Revision: 1598161 URL: http://svn.apache.org/r1598161 Log: AVRO-1442. Java: Fix ResolvingGrammarGenerator to work with fixed type. Contributed by Jim Pivarski. Added: avro/trunk/lang/java/avro/src/test/java/org/apache/avro/io/parsing/TestResolvingGrammarGenerator2.java (with props) Modified: avro/trunk/CHANGES.txt avro/trunk/lang/java/avro/src/main/java/org/apache/avro/io/parsing/ResolvingGrammarGenerator.java Modified: avro/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1598161&r1=1598160&r2=1598161&view=diff ============================================================================== --- avro/trunk/CHANGES.txt (original) +++ avro/trunk/CHANGES.txt Wed May 28 22:25:55 2014 @@ -70,6 +70,9 @@ Trunk (not yet released) AVRO-1457. Java: Fix Encoder so that offset in non-array-backed ByteBuffers is not altered when written. (Rob Turner via cutting) + AVRO-1442. Java: Fix ResolvingGrammarGenerator to work with fixed type. + (Jim Pivarski via cutting) + Avro 1.7.6 (15 January 2014) NEW FEATURES Modified: avro/trunk/lang/java/avro/src/main/java/org/apache/avro/io/parsing/ResolvingGrammarGenerator.java URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/avro/src/main/java/org/apache/avro/io/parsing/ResolvingGrammarGenerator.java?rev=1598161&r1=1598160&r2=1598161&view=diff ============================================================================== --- avro/trunk/lang/java/avro/src/main/java/org/apache/avro/io/parsing/ResolvingGrammarGenerator.java (original) +++ avro/trunk/lang/java/avro/src/main/java/org/apache/avro/io/parsing/ResolvingGrammarGenerator.java Wed May 28 22:25:55 2014 @@ -167,6 +167,7 @@ public class ResolvingGrammarGenerator e case ARRAY: case MAP: case RECORD: + case FIXED: break; default: throw new RuntimeException("Unexpected schema type: " + readerType); Added: avro/trunk/lang/java/avro/src/test/java/org/apache/avro/io/parsing/TestResolvingGrammarGenerator2.java URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/avro/src/test/java/org/apache/avro/io/parsing/TestResolvingGrammarGenerator2.java?rev=1598161&view=auto ============================================================================== --- avro/trunk/lang/java/avro/src/test/java/org/apache/avro/io/parsing/TestResolvingGrammarGenerator2.java (added) +++ avro/trunk/lang/java/avro/src/test/java/org/apache/avro/io/parsing/TestResolvingGrammarGenerator2.java Wed May 28 22:25:55 2014 @@ -0,0 +1,34 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.avro.io.parsing; + +import org.apache.avro.io.parsing.ResolvingGrammarGenerator; +import org.apache.avro.Schema; +import org.junit.Test; + +/** ResolvingGrammarGenerator tests that are not Parameterized.*/ +public class TestResolvingGrammarGenerator2 { + @Test public void testFixed() throws java.io.IOException { + new ResolvingGrammarGenerator().generate + (Schema.createFixed("MyFixed", null, null, 10), + Schema.create(Schema.Type.BYTES)); + new ResolvingGrammarGenerator().generate + (Schema.create(Schema.Type.BYTES), + Schema.createFixed("MyFixed", null, null, 10)); + } +} Propchange: avro/trunk/lang/java/avro/src/test/java/org/apache/avro/io/parsing/TestResolvingGrammarGenerator2.java ------------------------------------------------------------------------------ svn:eol-style = native