cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-9431) Static Analysis to warn on unsafe use of Autocloseable instances
Date Fri, 22 May 2015 19:50:19 GMT


Benedict commented on CASSANDRA-9431:

Thanks guys for squashing these issues. I've pushed some further modifications [here|]

* There was a bug introduced in SerializingCache, which could have double decremented the
* I have a comment in CompactionManager around a piece of code that was previously run in
a try/finally block. I'm not honestly sure what it's achieving, though, so I don't know which
is correct.
* Where it looked possible (and helpful) to do so, I've moved the SuppressWarnings flag to
the offending statement. This only works for some simple cases, but I think helps improve
clarity where it can be employed.
* I removed AutoCloseable from Ref, since we should never use it as one
* I also did some random tidying of bits I thought could be simplified

It's worth noting that this static analysis is *not* perfect - it seems to miss some other
potential holes. I'm hoping that [~iamaleksey]'s upcoming proposal for using lambdas will
help us avoid Iterators escaping into so much of the codebase, and that by attacking it from
both angles we'll hopefully be safe.

> Static Analysis to warn on unsafe use of Autocloseable instances
> ----------------------------------------------------------------
>                 Key: CASSANDRA-9431
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Benedict
>            Assignee: T Jake Luciani
>             Fix For: 2.2.0 rc1
> The ideal goal would be to fail the build under any unsafe (and not annotated as considered
safe independently) uses of Autocloseable. It looks as though eclipse (and hence, hopefully
ecj) has support for this feature, so we should investigate if it meets our requirements and
we can get it integrated

This message was sent by Atlassian JIRA

View raw message