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

Eelco Hillenius resolved AVRO-94.
---------------------------------

    Resolution: Invalid

I just came across this comment:

  /** 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>
   */

Big duh again... that pretty much explains this whole issue. I was testing from 
Eclipse directly, so paranamer was never included into the compilation. 
Resolving this issue as invalid.

> Paranamer does not return field names where Avro expects it does
> ----------------------------------------------------------------
>
>                 Key: AVRO-94
>                 URL: https://issues.apache.org/jira/browse/AVRO-94
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.0.0, 1.0.1
>         Environment: OSX Leopard, Java 1.6, Eclipse
>            Reporter: Eelco Hillenius
>             Fix For: 1.0.1
>
>
> Not sure whether this is a bug in Paranamer or whether Avro has the wrong 
> expectations, but currently TestReflect#testProtocol throws an 
> ArrayIndexOutOfBoundsException due to this problem, and 
> http://mail-archives.apache.org/mod_mbox/hadoop-avro-user/200908.mbox/%[email protected]%3e
>  seems to point to that same problem.
> In ReflectData#getMessage:
> {code}
> String[] paramNames = PARANAMER.lookupParameterNames(method);
> java.lang.reflect.Type[] paramTypes = method.getGenericParameterTypes();
> for (int i = 0; i < paramTypes.length; i++)
>   fields.put(paramNames[i],   <-- in the test, paramNames has lenght 0, while 
> paramTypes has length 1
> {code}

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

Reply via email to