Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-3850

Fix rawtypes warnings for Java 7 compiler

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5, 4.0-ALPHA
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Java 7 changed the warnings a little bit:

      • Java 6 only knew "unchecked" warning type, applying for all types of generics violations, like missing generics (raw types)
      • Java 7 still knows "unchecked" but only emits warning if the call is really unchecked. Declaration of variables/fields or constructing instances without type param now emits "rawtypes" warning.

      The changes above causes the Java 7 compile now emit lots of "rawtypes" warnings, where Java 6 is silent. The easy fix is to suppres both warning types: @SuppressWarnings(

      {"unchecked","rawtypes"}

      ) for all those places. Changes are easy to do, will provide patch later!

        Attachments

        1. LUCENE-3850-part1.patch
          196 kB
          Uwe Schindler
        2. LUCENE-3850-part1-branch3x.patch
          105 kB
          Uwe Schindler
        3. LUCENE-3850-part2.patch
          49 kB
          Uwe Schindler
        4. LUCENE-3850-parts2-branch3x.patch
          24 kB
          Uwe Schindler

          Activity

            People

            • Assignee:
              uschindler Uwe Schindler
              Reporter:
              uschindler Uwe Schindler
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: