lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (LUCENE-2285) Code cleanup from all sorts of (trivial) warnings
Date Fri, 26 Feb 2010 19:45:28 GMT

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

Uwe Schindler edited comment on LUCENE-2285 at 2/26/10 7:44 PM:
----------------------------------------------------------------

Hi Shai,

here is the patch with the above changes. I also improved some more inconsistencies in Test
code. Thanks for removing all this useless null checks after "new". In contrib/QueryParser's
Attribute's equals(), I removed the useless null check at all (you only exchanged the clauses),
as "null instance AnyClass" always returns false, so the check is useless and for equals()
which should be optimized, not needed.

I left the TEST_VERSION_CURRENT changes in! Will close the other issue (LUCENE-2251) after
commit.

At some places I left the casts, but only where I want to have them in all places.

After committing I will provide a diffed patch of the rest of your changes for more review
(so they do not get lost). I will commit this in a day.

      was (Author: thetaphi):
    Hi Shai,

here is the patch with the above changes. I also improved some more inconsistencies in Test
code. Thanks for removing all this useless null checks after "new". In contrib/QueryParser's
Attribute's equals(), I removed the useless null check at all (you only exchanged the clauses),
as "null instance AnyClass" always returns false, so the check is useless and for equals()
which should be optimized, not needed.

At some places I left the casts, but only where I want to have them in all places.

After committing I will provide a diffed patch of the rest of your changes for more review
(so they do not get lost). I will commit this in a day.
  
> 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