lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2285) Code cleanup from all sorts of (trivial) warnings
Date Sat, 27 Feb 2010 10:28:05 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839219#action_12839219
] 

Shai Erera commented on LUCENE-2285:
------------------------------------

Ok then we understand each other. Indeed I have a different opinion about casts. They are
called unnecessary because of a reason. When a method declares it returns an int, there no
reason to cast a char to an int. The compiler will do it for you. More than that, if the method
will declare it returns a long in the future, the cast will generate a compile error.

Styling like that always generate lots of opinions :). We shouldn't however limit ourselves
to only two opinions. The fact that you are not using Eclipse, and therefore don't see all
the warnings, doesn't mean the rest of us who do use eclipse should see them. If they are
justified then ok, but otherwise, saying 'javac does not complain' is just not enough for
me. Eclipse is where I spend a large portion of my day in ...

So I suggest we get more opinions from others. It's not just about what you or I think ...
but we can do this after the larger portion of the warnings is removed.

> Code cleanup from all sorts of (trivial) warnings
> -------------------------------------------------
>
>                 Key: LUCENE-2285
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2285
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Shai Erera
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 3.1
>
>         Attachments: LUCENE-2285.patch, LUCENE-2285.patch, LUCENE-2285.patch
>
>
> I would like to do some code cleanup and remove all sorts of trivial warnings, like unnecessary
casts, problems w/ javadocs, unused variables, redundant null checks, unnecessary semicolon
etc. These are all very trivial and should not pose any problem.
> I'll create another issue for getting rid of deprecated code usage, like LuceneTestCase
and all sorts of deprecated constructors. That's also trivial because it only affects Lucene
code, but it's a different type of change.
> Another issue I'd like to create is about introducing more generics in the code, where
it's missing today - not changing existing API. There are many places in the code like that.
> So, with you permission, I'll start with the trivial ones first, and then move on to
the others.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message