[
https://issues.apache.org/jira/browse/LUCENE-5551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13944445#comment-13944445
]
Uwe Schindler commented on LUCENE-5551:
---------------------------------------
Hi Shawn,
yes, javac also warns about redundant casts, but not so noisy. E.g. in your
patch you are fixing lots of warnings in luecen/core (e.g. PriorityQueue,
packed ints), but for me javac 1.7 passes without any warning (because I
generally fix them with heavy committing whenever new warnings pop up).
javac just prints cast warnings for very stupid cases and those not needed
because of generics, but it never ever complains about stuff like long/int
casts, because those are as I said, maybe redundant, but they are needed
explicitely express intentions behind the code.
Because of that I think we should not enable the useless cast warnings in
Eclipse. But of yourse you can use them to fix some warnings produced by javac,
although there are only few of them in Lucene.
> Fix warnings in the ant build
> -----------------------------
>
> Key: LUCENE-5551
> URL: https://issues.apache.org/jira/browse/LUCENE-5551
> Project: Lucene - Core
> Issue Type: Improvement
> Components: general/build
> Affects Versions: 4.8
> Reporter: Shawn Heisey
> Fix For: 5.0
>
> Attachments: LUCENE-5551-fix-fallthrough.patch,
> LUCENE-5551-redundant-casts.patch, LUCENE-5551-redundant-casts.patch
>
>
> The build produces a lot of warnings. LUCENE-5130 aims to fail the build on
> certain warnings, but until we actually eliminate those warnings from the
> code, failing the build is premature.
> This issue is concerned with fixing or suppressing warnings reported by the
> ant build, anything further than that may need one or more separate issues.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]