Marcono1234 created THRIFT-5485:
-----------------------------------
Summary: @SuppressWarnings is placed above Javadoc
Key: THRIFT-5485
URL: https://issues.apache.org/jira/browse/THRIFT-5485
Project: Thrift
Issue Type: Bug
Components: Java - Compiler
Affects Versions: 0.15.0
Reporter: Marcono1234
The Java compiler places in multiple situations the {{@SuppressWarnings}}
annotation above the Javadoc (see usage of {{java_suppressions}} in
{{t_java_generator.cc}}), example:
{code}
@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 ... {
...
}
{code}
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.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)