You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by GitBox <gi...@apache.org> on 2022/05/15 08:21:22 UTC

[GitHub] [thrift] Jimexist opened a new pull request, #2607: remove unused java generator suppresions

Jimexist opened a new pull request, #2607:
URL: https://github.com/apache/thrift/pull/2607

   <!-- Explain the changes in the pull request below: -->
   
   remove unused java generator suppresions
   
   <!-- We recommend you review the checklist/tips before submitting a pull request. -->
   
   - [ ] Did you create an [Apache Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket?  (not required for trivial changes)
   - [ ] If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
   - [ ] Did you squash your changes to a single commit?  (not required, but preferred)
   - [ ] Did you do your best to avoid breaking changes?  If one was needed, did you label the Jira ticket with "Breaking-Change"?
   - [ ] If your change does not involve any code, include `[skip ci]` anywhere in the commit message to free up build resources.
   
   <!--
     The Contributing Guide at:
     https://github.com/apache/thrift/blob/master/CONTRIBUTING.md
     has more details and tips for committing properly.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [thrift] Jimexist closed pull request #2607: remove unused java generator suppressions

Posted by GitBox <gi...@apache.org>.
Jimexist closed pull request #2607: remove unused java generator suppressions
URL: https://github.com/apache/thrift/pull/2607


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [thrift] Jimexist commented on a diff in pull request #2607: remove unused java generator suppressions

Posted by GitBox <gi...@apache.org>.
Jimexist commented on code in PR #2607:
URL: https://github.com/apache/thrift/pull/2607#discussion_r873141475


##########
compiler/cpp/src/thrift/generate/t_java_generator.cc:
##########
@@ -485,11 +484,6 @@ string t_java_generator::java_package() {
   return "";
 }
 
-string t_java_generator::java_suppressions() {
-  return "@SuppressWarnings({\"cast\", \"rawtypes\", \"serial\", \"unchecked\", \"unused\"})"
-         + endl;
-}

Review Comment:
   > How certain are you that these aren't used? I'm pretty sure some of them are still applicable in at least some situations.
   
   yeah you are right - i tried to localize the warning suppression only to find it's not worth it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [thrift] ctubbsii commented on a diff in pull request #2607: remove unused java generator suppressions

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on code in PR #2607:
URL: https://github.com/apache/thrift/pull/2607#discussion_r873250440


##########
compiler/cpp/src/thrift/generate/t_java_generator.cc:
##########
@@ -485,11 +484,6 @@ string t_java_generator::java_package() {
   return "";
 }
 
-string t_java_generator::java_suppressions() {
-  return "@SuppressWarnings({\"cast\", \"rawtypes\", \"serial\", \"unchecked\", \"unused\"})"
-         + endl;
-}

Review Comment:
   Some of these warnings should be fixed, though with better generated code. Like... why are we generating a logger that is unused? Or why are we using raw generics instead of the specific generic types when we know them? Or, why would we need to suppress serial? Why not just use the generated serialUid or a 1-up counter for custom Exceptions?
   
   All this would take work, but eventually, we could probably get rid of these warnings suppressions by improving the generator in other parts.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [thrift] ctubbsii commented on a diff in pull request #2607: remove unused java generator suppressions

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on code in PR #2607:
URL: https://github.com/apache/thrift/pull/2607#discussion_r873135616


##########
compiler/cpp/src/thrift/generate/t_java_generator.cc:
##########
@@ -485,11 +484,6 @@ string t_java_generator::java_package() {
   return "";
 }
 
-string t_java_generator::java_suppressions() {
-  return "@SuppressWarnings({\"cast\", \"rawtypes\", \"serial\", \"unchecked\", \"unused\"})"
-         + endl;
-}

Review Comment:
   How certain are you that these aren't used? I'm pretty sure some of them are still applicable in at least some situations.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org