[ 
https://issues.apache.org/jira/browse/CASSANDRA-11868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15296059#comment-15296059
 ] 

Sylvain Lebresne commented on CASSANDRA-11868:
----------------------------------------------

bq. unused imports

A patch that removes unused imports is great, but please make sure your IDE 
doesn't rewrite imports too (this quickly get obnoxious to review and tends to 
create conflicts with other patches, none of it being worth bothering about).

bq. raw types missing <>

I'll note that there is already CASSANDRA-8385 in the review stage that cleans 
up some of those, so that it's probably worth waiting for it to be dealt with 
and committed.

bq. case statements without defaults

This is going to be a matter of personal preference but I happen to think that 
this is fine, that sometimes you just don't need a default and forcing one to 
make IDEs happy is ... not great. Haven't ever seen a bug due to forgetting a 
default when you need one either for what it's worth.
Anyway, I'd say let's just not do that, saving us some time in writing and 
reviewing it. But of course some will disagree and if a fair majority loves 
forcing defaults, so be it.

bq. Do this only on trunk? or multiple branches

That kind of changes almost always goes exclusively on trunk.

bq. should I tackle 1,2,3 in separate branches/patches

With the caveat that I don't love 3 and think we should wait on CASSANDRA-8385 
for 2, we'd want at least different commits.


> unused imports and generic types
> --------------------------------
>
>                 Key: CASSANDRA-11868
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11868
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>
> I was going through Cassandra source and for busy work I started looking at 
> all the .java files eclipse flags as warning. They are broken roughly into a 
> few cases. 
> 1) unused imports 
> 2) raw types missing <> 
> 3) case statements without defaults 
> 4) @resource annotation 
> My IDE claims item 4 is not needed (it looks like we have done this to 
> signify methods that return objects that need to be closed) I can guess 4 was 
> done intentionally and short of making out own annotation I will ignore these 
> for now. 
> I would like to tackle this busy work before I get started. I have some 
> questions: 
> 1) Do this only on trunk? or multiple branches 
> 2) should I tackle 1,2,3 in separate branches/patches



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to