Github user aaudiber commented on a diff in the pull request:
https://github.com/apache/thrift/pull/649#discussion_r41702916
--- Diff: compiler/cpp/src/generate/t_java_generator.cc ---
@@ -441,7 +441,7 @@ string t_java_generator::java_type_imports() {
}
string t_java_generator::java_suppressions() {
- return "@SuppressWarnings({\"cast\", \"rawtypes\", \"serial\",
\"unchecked\"})\n";
+ return "@SuppressWarnings(\"all\")\n";
--- End diff --
It makes sense for people writing the code generator to see the warnings
for the code, but for external users who have no control over the generator
anyway, the autogen code warnings hide actually useful warnings.
Other options could be changing the code generator to avoid doing things
which generate warnings or adding more types of warnings to this list until it
only covers expected warnings. The first is really high-difficulty and
low-reward, and the second is harder to maintain.
It's hard to imagine users being helped by the warnings in their
autogenerated code, so we should just suppress them.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---