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 453A0200B8B for ; Mon, 19 Sep 2016 10:20:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 43F9E160ABC; Mon, 19 Sep 2016 08:20: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 ABFED160ACC for ; Mon, 19 Sep 2016 10:20:21 +0200 (CEST) Received: (qmail 51971 invoked by uid 500); 19 Sep 2016 08:20:20 -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 51903 invoked by uid 99); 19 Sep 2016 08:20:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Sep 2016 08:20:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 83E972C0D5B for ; Mon, 19 Sep 2016 08:20:20 +0000 (UTC) Date: Mon, 19 Sep 2016 08:20:20 +0000 (UTC) From: "Niels Basjes (JIRA)" To: dev@avro.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (AVRO-1901) creating a record called "Exception" leads to generated code not compiling MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 19 Sep 2016 08:20:22 -0000 [ https://issues.apache.org/jira/browse/AVRO-1901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Niels Basjes resolved AVRO-1901. -------------------------------- Resolution: Fixed Fix provided by [~radai] Thanks. > creating a record called "Exception" leads to generated code not compiling > -------------------------------------------------------------------------- > > Key: AVRO-1901 > URL: https://issues.apache.org/jira/browse/AVRO-1901 > Project: Avro > Issue Type: Bug > Components: java > Affects Versions: 1.7.7, 1.8.1, 1.9.0 > Reporter: radai rosenblatt > Assignee: Niels Basjes > > consider the following *.avsc file: > {code:title=Exception.avsc} > { > "type": "record", > "name": "Exception", > "namespace": "com.acme", > "fields" : [ > {"name": "value", "type": "int"} > ], > "doc": "Will not submit to your fascist naming conventions" > } > {code} > the generated java code will contain: > {code:title=Exception.java} > ... > @override > public Exception build() { > try { > ... > return record; > } catch (Exception e) { //boom > throw new org.apache.avro.AvroRuntimeException(e); > } > } > {code} > which fails to compile because Exception refers to the generated class (which does not extend Throwable) -- This message was sent by Atlassian JIRA (v6.3.4#6332)