Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5485

@SuppressWarnings is placed above Javadoc

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.15.0
    • 0.17.0
    • Java - Compiler
    • None

    Description

      The Java compiler places in multiple situations the @SuppressWarnings annotation above the Javadoc (see usage of java_suppressions in t_java_generator.cc), example:

      @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
      /**
       * Structs can also be exceptions, if they are nasty.
       */
      @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "...")
      public class InvalidOperation extends org.apache.thrift.TException ... {
          ...
      }
      

      At least for the javadoc command line tool and IntelliJ IDEA this prevent the Javadoc from being recognized.
      The Thrift Java compiler should place the @SuppressWarnings annotation below the Javadoc.

      As side note: It would also be good to change the autogen_comment (see t_generator.h) to a regular Java block comment (/* ... */). Currently it is a 'dangling' Javadoc comment (/** ... */). Apparently this does not affect the javadoc tool negatively, but it would be best not to rely on that.

      Attachments

        Issue Links

          Activity

            People

              jiayuliu Liu Jiayu
              Marcono1234 Marcono1234
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m