[
https://issues.apache.org/jira/browse/LUCENE-1855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760897#action_12760897
]
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: https://issues.apache.org/jira/browse/LUCENE-1855
> 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: [email protected]
For additional commands, e-mail: [email protected]