[jira] [Updated] (AVRO-1214) Generated protocol's method should return void instead of Void like one-way message
[ https://issues.apache.org/jira/browse/AVRO-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Kulp updated AVRO-1214: -- Resolution: Fixed Assignee: Daniel Kulp Status: Resolved (was: Patch Available) > Generated protocol's method should return void instead of Void like one-way > message > --- > > Key: AVRO-1214 > URL: https://issues.apache.org/jira/browse/AVRO-1214 > Project: Apache Avro > Issue Type: Improvement > Components: java >Affects Versions: 1.7.2 >Reporter: Sébastien Launay >Assignee: Daniel Kulp >Priority: Minor > Fix For: 1.9.0 > > Attachments: AVRO-1214-unbox-void-2012-12-05.patch > > > Using the following IDL: > {noformat} > @namespace("org.apache.avro.test") > protocol Simple { > error TestError { > string message; > } > string hello(string greeting); > void `error`() throws TestError; > void ping() oneway; > } > {noformat} > Will produce the interface: > {code:java} > package org.apache.avro.test; > public interface Simple { > public static final org.apache.avro.Protocol PROTOCOL = > org.apache.avro.Protocol.parse("..."); > java.lang.CharSequence hello(java.lang.CharSequence greeting) throws > org.apache.avro.AvroRemoteException; > java.lang.Void error() throws org.apache.avro.AvroRemoteException, > org.apache.avro.test.TestError; > void ping(); > public interface Callback extends Simple { > public static final org.apache.avro.Protocol PROTOCOL = > org.apache.avro.test.Simple.PROTOCOL; > void hello(java.lang.CharSequence greeting, > org.apache.avro.ipc.Callback callback) throws > java.io.IOException; > void error(org.apache.avro.ipc.Callback callback) throws > java.io.IOException; > } > } > {code} > Then one is forced to add {{return null;}} statement(s) in the interface > implementation for the {{error()}} method which can be a bit cumbersome and > that's not the case for the oneway {{ping()}} method. > This is fine on the Callback though because the developer can just ignore the > callback argument. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (AVRO-1214) Generated protocol's method should return void instead of Void like one-way message
[ https://issues.apache.org/jira/browse/AVRO-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Doug Cutting updated AVRO-1214: --- Fix Version/s: 1.8.0 Hadoop Flags: Incompatible change This looks like a good change, but it is incompatible and will break applications that currently implement interfaces that return Void, so I marked it for inclusion in 1.8.0, where we might include such incompatible changes. Even then, breaking existing applications is never good. We could implement this as an option to the compiler, so that folks can choose whether or not to generate interfaces that return Void for compatibility. Generated protocol's method should return void instead of Void like one-way message --- Key: AVRO-1214 URL: https://issues.apache.org/jira/browse/AVRO-1214 Project: Avro Issue Type: Improvement Components: java Affects Versions: 1.7.2 Reporter: Sébastien Launay Priority: Minor Fix For: 1.8.0 Attachments: AVRO-1214-unbox-void-2012-12-05.patch Using the following IDL: {noformat} @namespace(org.apache.avro.test) protocol Simple { error TestError { string message; } string hello(string greeting); void `error`() throws TestError; void ping() oneway; } {noformat} Will produce the interface: {code:java} package org.apache.avro.test; public interface Simple { public static final org.apache.avro.Protocol PROTOCOL = org.apache.avro.Protocol.parse(...); java.lang.CharSequence hello(java.lang.CharSequence greeting) throws org.apache.avro.AvroRemoteException; java.lang.Void error() throws org.apache.avro.AvroRemoteException, org.apache.avro.test.TestError; void ping(); public interface Callback extends Simple { public static final org.apache.avro.Protocol PROTOCOL = org.apache.avro.test.Simple.PROTOCOL; void hello(java.lang.CharSequence greeting, org.apache.avro.ipc.Callbackjava.lang.CharSequence callback) throws java.io.IOException; void error(org.apache.avro.ipc.Callbackjava.lang.Void callback) throws java.io.IOException; } } {code} Then one is forced to add {{return null;}} statement(s) in the interface implementation for the {{error()}} method which can be a bit cumbersome and that's not the case for the oneway {{ping()}} method. This is fine on the Callback though because the developer can just ignore the callback argument. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-1214) Generated protocol's method should return void instead of Void like one-way message
[ https://issues.apache.org/jira/browse/AVRO-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sébastien Launay updated AVRO-1214: --- Status: Patch Available (was: Open) Patch for using void instead of Void for two-ways message. Method {{SpecificCompiler#javaUnbox(Schema}} used in the Velocity template has been kept for compatibility with existing custom templates but is now deprecated in favour of {{SpecificCompiler#javaUnbox(Schema, boolean}}. This changes generates incompatible Java interface so I guess it should be targeted for 1.8.x. Patch is attached but can be found here as well: https://github.com/slaunay/avro/commits/enhancement/AVRO-1214-unbox-void Generated protocol's method should return void instead of Void like one-way message --- Key: AVRO-1214 URL: https://issues.apache.org/jira/browse/AVRO-1214 Project: Avro Issue Type: Improvement Components: java Affects Versions: 1.7.2 Reporter: Sébastien Launay Priority: Minor Attachments: AVRO-1214-unbox-void-2012-12-05.patch Using the following IDL: {noformat} @namespace(org.apache.avro.test) protocol Simple { error TestError { string message; } string hello(string greeting); void `error`() throws TestError; void ping() oneway; } {noformat} Will produce the interface: {code:java} package org.apache.avro.test; public interface Simple { public static final org.apache.avro.Protocol PROTOCOL = org.apache.avro.Protocol.parse(...); java.lang.CharSequence hello(java.lang.CharSequence greeting) throws org.apache.avro.AvroRemoteException; java.lang.Void error() throws org.apache.avro.AvroRemoteException, org.apache.avro.test.TestError; void ping(); public interface Callback extends Simple { public static final org.apache.avro.Protocol PROTOCOL = org.apache.avro.test.Simple.PROTOCOL; void hello(java.lang.CharSequence greeting, org.apache.avro.ipc.Callbackjava.lang.CharSequence callback) throws java.io.IOException; void error(org.apache.avro.ipc.Callbackjava.lang.Void callback) throws java.io.IOException; } } {code} Then one is forced to add {{return null;}} statement(s) in the interface implementation for the {{error()}} method which can be a bit cumbersome and that's not the case for the oneway {{ping()}} method. This is fine on the Callback though because the developer can just ignore the callback argument. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-1214) Generated protocol's method should return void instead of Void like one-way message
[ https://issues.apache.org/jira/browse/AVRO-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sébastien Launay updated AVRO-1214: --- Attachment: AVRO-1214-unbox-void-2012-12-05.patch Generated protocol's method should return void instead of Void like one-way message --- Key: AVRO-1214 URL: https://issues.apache.org/jira/browse/AVRO-1214 Project: Avro Issue Type: Improvement Components: java Affects Versions: 1.7.2 Reporter: Sébastien Launay Priority: Minor Attachments: AVRO-1214-unbox-void-2012-12-05.patch Using the following IDL: {noformat} @namespace(org.apache.avro.test) protocol Simple { error TestError { string message; } string hello(string greeting); void `error`() throws TestError; void ping() oneway; } {noformat} Will produce the interface: {code:java} package org.apache.avro.test; public interface Simple { public static final org.apache.avro.Protocol PROTOCOL = org.apache.avro.Protocol.parse(...); java.lang.CharSequence hello(java.lang.CharSequence greeting) throws org.apache.avro.AvroRemoteException; java.lang.Void error() throws org.apache.avro.AvroRemoteException, org.apache.avro.test.TestError; void ping(); public interface Callback extends Simple { public static final org.apache.avro.Protocol PROTOCOL = org.apache.avro.test.Simple.PROTOCOL; void hello(java.lang.CharSequence greeting, org.apache.avro.ipc.Callbackjava.lang.CharSequence callback) throws java.io.IOException; void error(org.apache.avro.ipc.Callbackjava.lang.Void callback) throws java.io.IOException; } } {code} Then one is forced to add {{return null;}} statement(s) in the interface implementation for the {{error()}} method which can be a bit cumbersome and that's not the case for the oneway {{ping()}} method. This is fine on the Callback though because the developer can just ignore the callback argument. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira