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

Hudson commented on AVRO-1619:
------------------------------

SUCCESS: Integrated in AvroJava #505 (See 
[https://builds.apache.org/job/AvroJava/505/])
AVRO-1619. Java: Improve javadoc comments in generated code.  Contributed by 
Niels Basjes. (cutting: rev 1645771)
* /avro/trunk/CHANGES.txt
* 
/avro/trunk/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm
* /avro/trunk/lang/java/tools/src/test/compiler/input/player.avsc
* 
/avro/trunk/lang/java/tools/src/test/compiler/output-string/avro/examples/baseball/Player.java
* /avro/trunk/lang/java/tools/src/test/compiler/output/Player.java


> 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
>            Assignee: Niels Basjes
>             Fix For: 1.8.0
>
>         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)

Reply via email to