You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "prabhakhar kaliyamurthy (JIRA)" <ji...@apache.org> on 2010/11/22 07:20:13 UTC

[jira] Resolved: (AVRO-699) Emprty name for a type in .avro file creates java class with compile-time errors.

     [ https://issues.apache.org/jira/browse/AVRO-699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

prabhakhar kaliyamurthy resolved AVRO-699.
------------------------------------------

       Resolution: Duplicate
    Fix Version/s: 1.5.0

Thank you for your quick response and the fix. I will close this as a duplicate of AVRO-671.

I didnt notice the other jira item. My apologies for taking your time.

-- Thanks,
Prabhakhar K

> Emprty name for a type in .avro file creates java class with compile-time errors.
> ---------------------------------------------------------------------------------
>
>                 Key: AVRO-699
>                 URL: https://issues.apache.org/jira/browse/AVRO-699
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.4.1
>         Environment: Windows 2003 Server
>            Reporter: prabhakhar kaliyamurthy
>             Fix For: 1.5.0
>
>
> Emprty name for a type in .avro file creates java class with compile-time errors.
> Try to generate  java object for the following avro defintion.
> {
> "namespace" : "com.ebay.test.benchmark.avro",
> "protocol": "AvroBenchmarkProtocol",
> "doc": "BenchmarkingAvro",
> "types" : [
>  {
>  	"type" : "record",
>  	"name" : "AvroBenchmarkObject",
>  	"fields" : [ 	
>  	    {"name" : "", "type": "string"}
>  	 ]
>  }   
>    ]
> }
> is creating the following  java class with compile time error.
> package com.ebay.test.benchmark.avro;
> @SuppressWarnings("all")
> public class AvroBenchmarkObject extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
>   public static final org.apache.avro.Schema SCHEMA$ = org.apache.avro.Schema.parse("{\"type\":\"record\",\"name\":\"AvroBenchmarkObject\",\"namespace\":\"com.ebay.test.benchmark.avro\",\"fields\":[{\"name\":\"\",\"type\":\"int\"}]}");
>   public int ;
>   public org.apache.avro.Schema getSchema() { return SCHEMA$; }
>   // Used by DatumWriter.  Applications should not call. 
>   public java.lang.Object get(int field$) {
>     switch (field$) {
>     case 0: return ;
>     default: throw new org.apache.avro.AvroRuntimeException("Bad index");
>     }
>   }
>   // Used by DatumReader.  Applications should not call. 
>   @SuppressWarnings(value="unchecked")
>   public void put(int field$, java.lang.Object value$) {
>     switch (field$) {
>     case 0:  = (java.lang.Integer)value$; break;
>     default: throw new org.apache.avro.AvroRuntimeException("Bad index");
>     }
>   }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.