You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/12/15 23:07:13 UTC

[jira] [Commented] (AVRO-1619) Generate better JavaDoc

    [ https://issues.apache.org/jira/browse/AVRO-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14247300#comment-14247300 ] 

ASF subversion and git services commented on AVRO-1619:
-------------------------------------------------------

Commit 1645771 from [~cutting] in branch 'avro/trunk'
[ https://svn.apache.org/r1645771 ]

AVRO-1619. Java: Improve javadoc comments in generated code.  Contributed by Niels Basjes.

> Generate better JavaDoc
> -----------------------
>
>                 Key: AVRO-1619
>                 URL: https://issues.apache.org/jira/browse/AVRO-1619
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.7.7
>            Reporter: Niels Basjes
>         Attachments: AVRO-1619-2014-12-11-v1.patch
>
>
> Assume the following IDL snippet:
> {code}
> @namespace("nl.basjes.avro.test")
> protocol Something {
>     record MyRecord {
>         /** The time (epoch in milliseconds since 1970-01-01) */
>         long    timestamp;
>     }
> }
> {code}
> The currently generated java code looks like this:
> {code}
>   /**
>    * Gets the value of the 'timestamp' field.
>    * The time (epoch in milliseconds since 1970-01-01) when the event occurred   */
>   public java.lang.Long getTimestamp() {
>     return timestamp;
>   }
>   /**
>    * Sets the value of the 'timestamp' field.
>    * The time (epoch in milliseconds since 1970-01-01) when the event occurred   * @param value the value to set.
>    */
>   public void setTimestamp(java.lang.Long value) {
>     this.timestamp = value;
>   }
> {code}
> Because the "@param" is not on a new line this is not shown in my IDE (IntelliJ 14) as a parameter.
> In addition the getters and setters within the Builder are missing these comments and the @param completely.
> {code}
>     /** Gets the value of the 'timestamp' field */
>     public java.lang.Long getTimestamp() {
>       return timestamp;
>     }
>     
>     /** Sets the value of the 'timestamp' field */
>     public nl.basjes.avro.test.MyRecord.Builder setTimestamp(long value) {
>       validate(fields()[0], value);
>       this.timestamp = value;
>       fieldSetFlags()[0] = true;
>       return this; 
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)