lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] Commented: (LUCENE-1855) Change AttributeSource API to use generics
Date Wed, 30 Sep 2009 12:32:32 GMT


Uwe Schindler commented on LUCENE-1855:

As we are now on Java 1.5, I would like to go forward with this issue as the first real patch
using generics.

During development of generics, it is really important that you see all unchecked warnings,
so this patch also adds <compilerarg line="-Xlint:unchecked"/> to the javac task. The
problem is now, that all non-generics classes in Lucene generate tons of warnings. I would
like to proceed like the following:
- Open a new issue that adds this compilerarg.
- Add a @SuppressWarnings("unchecked") in front of each class, that (currently) produces warnings
(should not be so many, hopefully).

After that the compilation should run without warnings about unchecked casts and so on. When
starting to add generics to some of the classes, the developer would remove the SuppressWarnings
for the class he works on and start fixing the warnngs and adding generics.

What do you think? Without that, it is hard to add the generics 100% safe and consistent without
be lost in tons of warnings and so on.

I will also update this patch to also remove the now unneeded casts in all addAttribute calls
in Lucene (low priority).

> Change AttributeSource API to use generics
> ------------------------------------------
>                 Key: LUCENE-1855
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Analysis
>            Reporter: Michael Busch
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 3.0
>         Attachments: AttributeSource.jad, LUCENE-1855.patch, LUCENE-1855.patch
> The AttributeSource API will be easier to use with JDK 1.5 generics.
> Uwe, if you started working on a patch for this already feel free to assign this to you.

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