[
https://issues.apache.org/jira/browse/LUCENE-5551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13944152#comment-13944152
]
Uwe Schindler commented on LUCENE-5551:
---------------------------------------
Thanks!
One additional thing: In most cases for maximum compatibility we need both
@SuppressWarnings: rawtypes and unchecked. The problem is eclipse's compiler
differs from Java 7's and (this was the problem earlier: Java 7's differed
significantly from Java 6's). So we had both.
As we are now only on Java 7, we can check this again: Try it with all
available compilers (including Java 8). For maximum safety, we should have both
({{"rawtypes", "unchecked"}} - although Eclipse complains on useless
SuppressWarnings).
As mentioned before: suppress warnings for redundant casts and keep them as
they are - I prefer to have them, code is better readable. Some of them are
fine in your patch (like the char -> int casts), but the int -> long ones are
too risky (because tests won't catch the bugs, as we don't have such large
indexes,...). There is a reason why Oracle's javac does not complain about
redundatnt casts (not even in Java 8). They are useful to clarify the
intentions of the coder - so suppress them if eclipse complains. Ideally we
should disable this warning in the eclipse configuration file generated by
{{ant eclipse}}.
> 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
>
>
> 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]