lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] Commented: (LUCENE-2285) Code cleanup from all sorts of (trivial) warnings
Date Fri, 26 Feb 2010 09:42:28 GMT


Uwe Schindler commented on LUCENE-2285:

bq. Like I said, it's a styling issue. I'm not going to turn off my warnings in eclipse ...
and I don't understand what's this 'generified instanceof checks" - can you give an example?


So if you try to do "if (list instanceof ArrayList<Type>)" it throws compiler error.
But my Eclipse here complains at about 400 places that there are missing generics in these
instanceof checks. Instanceof checks are always raw and can never use generics (it makes no
sense). Example: Open eclipse and look into warnings: CharArraySet.equals() uses raw type.
Javac does not complain, but Eclipse wants to fix with: "if (map instanceof UnmodifiableCharArrayMap<?>)"
- this is bullshit and helps nobody. The Java language spec and Sun's Generics Howto clearly
say, that instanceof checks should use raw types.

> Code cleanup from all sorts of (trivial) warnings
> -------------------------------------------------
>                 Key: LUCENE-2285
>                 URL:
>             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
> 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:
For additional commands, e-mail:

View raw message