Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-1619

Generate better JavaDoc

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.7
    • Fix Version/s: 1.8.0
    • Component/s: java
    • Labels:
      None

      Description

      Assume the following IDL snippet:

      @namespace("nl.basjes.avro.test")
      protocol Something {
          record MyRecord {
              /** The time (epoch in milliseconds since 1970-01-01) */
              long    timestamp;
          }
      }
      

      The currently generated java code looks like this:

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

      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.

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

        Attachments

        1. AVRO-1619-2014-12-11-v1.patch
          19 kB
          Niels Basjes

          Activity

            People

            • Assignee:
              nielsbasjes Niels Basjes
              Reporter:
              nielsbasjes Niels Basjes
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: