You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by GitBox <gi...@apache.org> on 2022/04/18 06:00:23 UTC

[GitHub] [thrift] Jimexist commented on a diff in pull request #2575: THRIFT-5563: fix deprecation and enable xlint for java library

Jimexist commented on code in PR #2575:
URL: https://github.com/apache/thrift/pull/2575#discussion_r851902434


##########
lib/java/gradle/sourceConfiguration.gradle:
##########
@@ -60,7 +60,16 @@ tasks.withType(JavaCompile) {
     if (JavaVersion.current() > JavaVersion.VERSION_1_8) {
         options.compilerArgs.addAll(['--release', '8'])
     }
-    // options.compilerArgs.addAll('-Xlint:unchecked')
+    options.compilerArgs.addAll([
+            '-Werror',
+            '-Xlint:deprecation',
+            '-Xlint:cast',
+            '-Xlint:empty',
+            '-Xlint:fallthrough',
+            '-Xlint:finally',
+            '-Xlint:overrides',
+            // we can't enable -Xlint:unchecked just yet

Review Comment:
   thanks but i've tried locally, `'-Xlint:all,-unchecked',` does not work as it will still enforce `unchecked`.
   
   in the longer term i'd plan to remove all unchecked code styles so the current explicit enumeration seems fine to me.



-- 
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