[
https://issues.apache.org/jira/browse/AVRO-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776507#action_12776507
]
Philip Zeyliger commented on AVRO-185:
--------------------------------------
Ah, yes, that makes sense. I think the javadoc in Specific.getProtocol() needs
updating.
{noformat}
/** Generate a protocol for a Java interface.
* <p>Note that this requires that <a
* href="http://paranamer.codehaus.org/">Paranamer</a> is run over compiled
* interface declarations, since Java 6 reflection does not provide access to
* method parameter names. See Avro's build.xml for an example. </p>
*/
public Protocol getProtocol(Class iface) {
try {
return (Protocol)(iface.getDeclaredField("_PROTOCOL").get(null));
} catch (NoSuchFieldException e) {
throw new AvroRuntimeException(e);
} catch (IllegalAccessException e) {
throw new AvroRuntimeException(e);
}
}
{noformat}
Should you also update the build.xml to remove the paranamer compilation step?
-- Philip
> specific should not depend on reflect
> -------------------------------------
>
> Key: AVRO-185
> URL: https://issues.apache.org/jira/browse/AVRO-185
> Project: Avro
> Issue Type: Improvement
> Components: java
> Reporter: Doug Cutting
> Assignee: Doug Cutting
> Fix For: 1.3.0
>
> Attachments: AVRO-185.patch
>
>
> Currently the specific implementation inherits from the reflect
> implementation. To fix AVRO-80, this dependency should be reversed, since
> specific will still share all data representations but records and enums with
> generic, but specific and reflect will no longer use common representations
> for strings and arrays.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.