apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.56k stars 1k forks source link

Reduce warnings emitted by javac in Java 7/Java 8 [LUCENE-6740] #7798

Open asfimport opened 9 years ago

asfimport commented 9 years ago

This is a overview issue about improvements to reduce warnings during the build. Since we moved trunk to Java 8 and branch_5x to Java 7, there were introduced some additional warnings, mostly in generated code.

ANTLR4 does automatically add the needed @SuppressWarnings, but jflex does not. There are also some rawtypes warnings, which changed in Java 7 (before Java 7 there were only "unsafe" warnings, now you need both.

I enabled the Warnings tracker in Policeman Jenkins, we can therefore very easily check the warnings: e.g. on trunk: http://jenkins.thetaphi.de/job/Lucene-Solr-trunk-Linux/ (see diagram on the right), you can click on it, e.g. http://jenkins.thetaphi.de/job/Lucene-Solr-trunk-Linux/warnings4


Migrated from LUCENE-6740 by Uwe Schindler (@uschindler), updated May 09 2016 Linked issues:

asfimport commented 9 years ago

Uwe Schindler (@uschindler) (migrated from JIRA)

I will directly commit the changes, no patches (as there is no functionality change).

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696035 from @uschindler in branch 'dev/trunk' https://svn.apache.org/r1696035

LUCENE-6740: Reduce warnings emitted by javac

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696036 from @uschindler in branch 'dev/branches/branch_5x' https://svn.apache.org/r1696036

Merged revision(s) 1696035 from lucene/dev/trunk: LUCENE-6740: Reduce warnings emitted by javac (I also had to fix the old, deprecated jflex grammars, because they got out of sync with java code)

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696039 from @uschindler in branch 'dev/branches/lucene_solr_5_3' https://svn.apache.org/r1696039

Merged revision(s) 1696036 from lucene/dev/branches/branch_5x (because of inability to regenerate jflex autogenerated files): Merged revision(s) 1696035 from lucene/dev/trunk: LUCENE-6740: Reduce warnings emitted by javac (I also had to fix the old, deprecated jflex grammars, because they got out of sync with java code)

asfimport commented 9 years ago

Uwe Schindler (@uschindler) (migrated from JIRA)

I backported the last fix also to 5.3 branch, because the inability to regenerate java classes from jflex grammars is a blocker (the generated code did not even compile because of missing classes!!!)

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696044 from @uschindler in branch 'dev/trunk' https://svn.apache.org/r1696044

LUCENE-6740: Reduce warnings emitted by javac #2

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696046 from @uschindler in branch 'dev/branches/branch_5x' https://svn.apache.org/r1696046

Merged revision(s) 1696044 from lucene/dev/trunk: LUCENE-6740: Reduce warnings emitted by javac #2

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696047 from @uschindler in branch 'dev/trunk' https://svn.apache.org/r1696047

LUCENE-6740: Reduce warnings emitted by javac #3

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696048 from @uschindler in branch 'dev/branches/branch_5x' https://svn.apache.org/r1696048

Merged revision(s) 1696047 from lucene/dev/trunk: LUCENE-6740: Reduce warnings emitted by javac #3

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696064 from @uschindler in branch 'dev/trunk' https://svn.apache.org/r1696064

7799: This was already fixed by LUCENE-6740, just add this issue to track changes.

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696065 from @uschindler in branch 'dev/branches/branch_5x' https://svn.apache.org/r1696065

Merged revision(s) 1696064 from lucene/dev/trunk:

7799: This was already fixed by LUCENE-6740, just add this issue to track changes.

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696066 from @uschindler in branch 'dev/branches/lucene_solr_5_3' https://svn.apache.org/r1696066

Merged revision(s) 1696065 from lucene/dev/branches/branch_5x: Merged revision(s) 1696064 from lucene/dev/trunk:

7799: This was already fixed by LUCENE-6740, just add this issue to track changes.

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696072 from @uschindler in branch 'dev/trunk' https://svn.apache.org/r1696072

LUCENE-6740: Reduce warnings emitted by javac #4 (tools)

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696073 from @uschindler in branch 'dev/branches/branch_5x' https://svn.apache.org/r1696073

Merged revision(s) 1696072 from lucene/dev/trunk: LUCENE-6740: Reduce warnings emitted by javac #4 (tools)

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696076 from @uschindler in branch 'dev/trunk' https://svn.apache.org/r1696076

LUCENE-6740: Reduce warnings emitted by javac #5

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696077 from @uschindler in branch 'dev/branches/branch_5x' https://svn.apache.org/r1696077

Merged revision(s) 1696076 from lucene/dev/trunk: LUCENE-6740: Reduce warnings emitted by javac #5

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696080 from @uschindler in branch 'dev/trunk' https://svn.apache.org/r1696080

LUCENE-6740: Reduce warnings emitted by javac #6

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696081 from @uschindler in branch 'dev/branches/branch_5x' https://svn.apache.org/r1696081

Merged revision(s) 1696080 from lucene/dev/trunk: LUCENE-6740: Reduce warnings emitted by javac #6

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696098 from @uschindler in branch 'dev/trunk' https://svn.apache.org/r1696098

LUCENE-6740: Reduce warnings emitted by javac #7

asfimport commented 9 years ago

ASF subversion and git services (migrated from JIRA)

Commit 1696099 from @uschindler in branch 'dev/branches/branch_5x' https://svn.apache.org/r1696099

Merged revision(s) 1696098 from lucene/dev/trunk: LUCENE-6740: Reduce warnings emitted by javac #7