accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [accumulo] branch master updated: Ignore unused variables in try-with-resources
Date Fri, 22 Feb 2019 00:42:16 GMT
This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch master
in repository

The following commit(s) were added to refs/heads/master by this push:
     new 06349e6  Ignore unused variables in try-with-resources
06349e6 is described below

commit 06349e644d22a42a7099d6224e5cd41cbc03bb32
Author: Christopher Tubbs <>
AuthorDate: Tue Feb 19 21:28:12 2019 -0500

    Ignore unused variables in try-with-resources
    Reduce compiler warning spam from the use of AutoCloseable trace objects
    created in try-with-resources blocks. This could allow some bugs to be
    overlooked of the type where the wrong variable is referenced inside the
    block or the resource is created, but not needed for the block.
    Unfortunately, it's not possible to ignore them by specific types.
    Otherwise, I'd just ignore the TraceScope ones.
    It may be useful to, instead of ignoring these warnings for TraceScope
    objects, add annotated data to the scope, so that way it's both
    referenced, and has additional meaningful data in the resulting trace
 pom.xml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pom.xml b/pom.xml
index 6f1f1d0..9f3f87a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -846,6 +846,8 @@
+              <!-- suppress try to ignore unused variable in try-with-resources -->
+              <arg>-Xlint:-try</arg>

View raw message